gmock/gtest/fused-src/gtest/gtest.h
Go to the documentation of this file.
1 // Copyright 2005, Google Inc.
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are
6 // met:
7 //
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above
11 // copyright notice, this list of conditions and the following disclaimer
12 // in the documentation and/or other materials provided with the
13 // distribution.
14 // * Neither the name of Google Inc. nor the names of its
15 // contributors may be used to endorse or promote products derived from
16 // this software without specific prior written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // Author: wan@google.com (Zhanyong Wan)
31 //
32 // The Google C++ Testing Framework (Google Test)
33 //
34 // This header file defines the public API for Google Test. It should be
35 // included by any test program that uses Google Test.
36 //
37 // IMPORTANT NOTE: Due to limitation of the C++ language, we have to
38 // leave some internal implementation details in this header file.
39 // They are clearly marked by comments like this:
40 //
41 // // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
42 //
43 // Such code is NOT meant to be used by a user directly, and is subject
44 // to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
45 // program!
46 //
47 // Acknowledgment: Google Test borrowed the idea of automatic test
48 // registration from Barthelemy Dagenais' (barthelemy@prologique.com)
49 // easyUnit framework.
50 
51 #ifndef GTEST_INCLUDE_GTEST_GTEST_H_
52 #define GTEST_INCLUDE_GTEST_GTEST_H_
53 
54 #include <limits>
55 #include <ostream>
56 #include <vector>
57 
58 // Copyright 2005, Google Inc.
59 // All rights reserved.
60 //
61 // Redistribution and use in source and binary forms, with or without
62 // modification, are permitted provided that the following conditions are
63 // met:
64 //
65 // * Redistributions of source code must retain the above copyright
66 // notice, this list of conditions and the following disclaimer.
67 // * Redistributions in binary form must reproduce the above
68 // copyright notice, this list of conditions and the following disclaimer
69 // in the documentation and/or other materials provided with the
70 // distribution.
71 // * Neither the name of Google Inc. nor the names of its
72 // contributors may be used to endorse or promote products derived from
73 // this software without specific prior written permission.
74 //
75 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
76 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
77 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
78 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
79 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
80 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
81 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
82 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
83 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
84 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
85 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
86 //
87 // Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
88 //
89 // The Google C++ Testing Framework (Google Test)
90 //
91 // This header file declares functions and macros used internally by
92 // Google Test. They are subject to change without notice.
93 
94 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
95 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
96 
97 // Copyright 2005, Google Inc.
98 // All rights reserved.
99 //
100 // Redistribution and use in source and binary forms, with or without
101 // modification, are permitted provided that the following conditions are
102 // met:
103 //
104 // * Redistributions of source code must retain the above copyright
105 // notice, this list of conditions and the following disclaimer.
106 // * Redistributions in binary form must reproduce the above
107 // copyright notice, this list of conditions and the following disclaimer
108 // in the documentation and/or other materials provided with the
109 // distribution.
110 // * Neither the name of Google Inc. nor the names of its
111 // contributors may be used to endorse or promote products derived from
112 // this software without specific prior written permission.
113 //
114 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
115 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
116 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
117 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
118 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
119 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
120 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
121 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
122 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
123 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
124 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
125 //
126 // Authors: wan@google.com (Zhanyong Wan)
127 //
128 // Low-level types and utilities for porting Google Test to various
129 // platforms. They are subject to change without notice. DO NOT USE
130 // THEM IN USER CODE.
131 //
132 // This file is fundamental to Google Test. All other Google Test source
133 // files are expected to #include this. Therefore, it cannot #include
134 // any other Google Test header.
135 
136 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
137 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
138 
139 // The user can define the following macros in the build script to
140 // control Google Test's behavior. If the user doesn't define a macro
141 // in this list, Google Test will define it.
142 //
143 // GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2)
144 // is/isn't available.
145 // GTEST_HAS_EXCEPTIONS - Define it to 1/0 to indicate that exceptions
146 // are enabled.
147 // GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string
148 // is/isn't available (some systems define
149 // ::string, which is different to std::string).
150 // GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string
151 // is/isn't available (some systems define
152 // ::wstring, which is different to std::wstring).
153 // GTEST_HAS_POSIX_RE - Define it to 1/0 to indicate that POSIX regular
154 // expressions are/aren't available.
155 // GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that <pthread.h>
156 // is/isn't available.
157 // GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't
158 // enabled.
159 // GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that
160 // std::wstring does/doesn't work (Google Test can
161 // be used where std::wstring is unavailable).
162 // GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple
163 // is/isn't available.
164 // GTEST_HAS_SEH - Define it to 1/0 to indicate whether the
165 // compiler supports Microsoft's "Structured
166 // Exception Handling".
167 // GTEST_HAS_STREAM_REDIRECTION
168 // - Define it to 1/0 to indicate whether the
169 // platform supports I/O stream redirection using
170 // dup() and dup2().
171 // GTEST_USE_OWN_TR1_TUPLE - Define it to 1/0 to indicate whether Google
172 // Test's own tr1 tuple implementation should be
173 // used. Unused when the user sets
174 // GTEST_HAS_TR1_TUPLE to 0.
175 // GTEST_LANG_CXX11 - Define it to 1/0 to indicate that Google Test
176 // is building in C++11/C++98 mode.
177 // GTEST_LINKED_AS_SHARED_LIBRARY
178 // - Define to 1 when compiling tests that use
179 // Google Test as a shared library (known as
180 // DLL on Windows).
181 // GTEST_CREATE_SHARED_LIBRARY
182 // - Define to 1 when compiling Google Test itself
183 // as a shared library.
184 
185 // This header defines the following utilities:
186 //
187 // Macros indicating the current platform (defined to 1 if compiled on
188 // the given platform; otherwise undefined):
189 // GTEST_OS_AIX - IBM AIX
190 // GTEST_OS_CYGWIN - Cygwin
191 // GTEST_OS_HPUX - HP-UX
192 // GTEST_OS_LINUX - Linux
193 // GTEST_OS_LINUX_ANDROID - Google Android
194 // GTEST_OS_MAC - Mac OS X
195 // GTEST_OS_IOS - iOS
196 // GTEST_OS_IOS_SIMULATOR - iOS simulator
197 // GTEST_OS_NACL - Google Native Client (NaCl)
198 // GTEST_OS_OPENBSD - OpenBSD
199 // GTEST_OS_QNX - QNX
200 // GTEST_OS_SOLARIS - Sun Solaris
201 // GTEST_OS_SYMBIAN - Symbian
202 // GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile)
203 // GTEST_OS_WINDOWS_DESKTOP - Windows Desktop
204 // GTEST_OS_WINDOWS_MINGW - MinGW
205 // GTEST_OS_WINDOWS_MOBILE - Windows Mobile
206 // GTEST_OS_ZOS - z/OS
207 //
208 // Among the platforms, Cygwin, Linux, Max OS X, and Windows have the
209 // most stable support. Since core members of the Google Test project
210 // don't have access to other platforms, support for them may be less
211 // stable. If you notice any problems on your platform, please notify
212 // googletestframework@googlegroups.com (patches for fixing them are
213 // even more welcome!).
214 //
215 // Note that it is possible that none of the GTEST_OS_* macros are defined.
216 //
217 // Macros indicating available Google Test features (defined to 1 if
218 // the corresponding feature is supported; otherwise undefined):
219 // GTEST_HAS_COMBINE - the Combine() function (for value-parameterized
220 // tests)
221 // GTEST_HAS_DEATH_TEST - death tests
222 // GTEST_HAS_PARAM_TEST - value-parameterized tests
223 // GTEST_HAS_TYPED_TEST - typed tests
224 // GTEST_HAS_TYPED_TEST_P - type-parameterized tests
225 // GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with
226 // GTEST_HAS_POSIX_RE (see above) which users can
227 // define themselves.
228 // GTEST_USES_SIMPLE_RE - our own simple regex is used;
229 // the above two are mutually exclusive.
230 // GTEST_CAN_COMPARE_NULL - accepts untyped NULL in EXPECT_EQ().
231 //
232 // Macros for basic C++ coding:
233 // GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
234 // GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a
235 // variable don't have to be used.
236 // GTEST_DISALLOW_ASSIGN_ - disables operator=.
237 // GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.
238 // GTEST_MUST_USE_RESULT_ - declares that a function's result must be used.
239 //
240 // Synchronization:
241 // Mutex, MutexLock, ThreadLocal, GetThreadCount()
242 // - synchronization primitives.
243 // GTEST_IS_THREADSAFE - defined to 1 to indicate that the above
244 // synchronization primitives have real implementations
245 // and Google Test is thread-safe; or 0 otherwise.
246 //
247 // Template meta programming:
248 // is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only.
249 // IteratorTraits - partial implementation of std::iterator_traits, which
250 // is not available in libCstd when compiled with Sun C++.
251 //
252 // Smart pointers:
253 // scoped_ptr - as in TR2.
254 //
255 // Regular expressions:
256 // RE - a simple regular expression class using the POSIX
257 // Extended Regular Expression syntax on UNIX-like
258 // platforms, or a reduced regular exception syntax on
259 // other platforms, including Windows.
260 //
261 // Logging:
262 // GTEST_LOG_() - logs messages at the specified severity level.
263 // LogToStderr() - directs all log messages to stderr.
264 // FlushInfoLog() - flushes informational log messages.
265 //
266 // Stdout and stderr capturing:
267 // CaptureStdout() - starts capturing stdout.
268 // GetCapturedStdout() - stops capturing stdout and returns the captured
269 // string.
270 // CaptureStderr() - starts capturing stderr.
271 // GetCapturedStderr() - stops capturing stderr and returns the captured
272 // string.
273 //
274 // Integer types:
275 // TypeWithSize - maps an integer to a int type.
276 // Int32, UInt32, Int64, UInt64, TimeInMillis
277 // - integers of known sizes.
278 // BiggestInt - the biggest signed integer type.
279 //
280 // Command-line utilities:
281 // GTEST_FLAG() - references a flag.
282 // GTEST_DECLARE_*() - declares a flag.
283 // GTEST_DEFINE_*() - defines a flag.
284 // GetInjectableArgvs() - returns the command line as a vector of strings.
285 //
286 // Environment variable utilities:
287 // GetEnv() - gets the value of an environment variable.
288 // BoolFromGTestEnv() - parses a bool environment variable.
289 // Int32FromGTestEnv() - parses an Int32 environment variable.
290 // StringFromGTestEnv() - parses a string environment variable.
291 
292 #include <ctype.h> // for isspace, etc
293 #include <stddef.h> // for ptrdiff_t
294 #include <stdlib.h>
295 #include <stdio.h>
296 #include <string.h>
297 #ifndef _WIN32_WCE
298 # include <sys/types.h>
299 # include <sys/stat.h>
300 #endif // !_WIN32_WCE
301 
302 #if defined __APPLE__
303 # include <AvailabilityMacros.h>
304 # include <TargetConditionals.h>
305 #endif
306 
307 #include <iostream> // NOLINT
308 #include <sstream> // NOLINT
309 #include <string> // NOLINT
310 
311 #define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
312 #define GTEST_FLAG_PREFIX_ "gtest_"
313 #define GTEST_FLAG_PREFIX_DASH_ "gtest-"
314 #define GTEST_FLAG_PREFIX_UPPER_ "GTEST_"
315 #define GTEST_NAME_ "Google Test"
316 #define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/"
317 
318 // Determines the version of gcc that is used to compile this.
319 #ifdef __GNUC__
320 // 40302 means version 4.3.2.
321 # define GTEST_GCC_VER_ \
322  (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
323 #endif // __GNUC__
324 
325 // Determines the platform on which Google Test is compiled.
326 #ifdef __CYGWIN__
327 # define GTEST_OS_CYGWIN 1
328 #elif defined __SYMBIAN32__
329 # define GTEST_OS_SYMBIAN 1
330 #elif defined _WIN32
331 # define GTEST_OS_WINDOWS 1
332 # ifdef _WIN32_WCE
333 # define GTEST_OS_WINDOWS_MOBILE 1
334 # elif defined(__MINGW__) || defined(__MINGW32__)
335 # define GTEST_OS_WINDOWS_MINGW 1
336 # else
337 # define GTEST_OS_WINDOWS_DESKTOP 1
338 # endif // _WIN32_WCE
339 #elif defined __APPLE__
340 # define GTEST_OS_MAC 1
341 # if TARGET_OS_IPHONE
342 # define GTEST_OS_IOS 1
343 # if TARGET_IPHONE_SIMULATOR
344 # define GTEST_OS_IOS_SIMULATOR 1
345 # endif
346 # endif
347 #elif defined __linux__
348 # define GTEST_OS_LINUX 1
349 # if defined __ANDROID__
350 # define GTEST_OS_LINUX_ANDROID 1
351 # endif
352 #elif defined __MVS__
353 # define GTEST_OS_ZOS 1
354 #elif defined(__sun) && defined(__SVR4)
355 # define GTEST_OS_SOLARIS 1
356 #elif defined(_AIX)
357 # define GTEST_OS_AIX 1
358 #elif defined(__hpux)
359 # define GTEST_OS_HPUX 1
360 #elif defined __native_client__
361 # define GTEST_OS_NACL 1
362 #elif defined __OpenBSD__
363 # define GTEST_OS_OPENBSD 1
364 #elif defined __QNX__
365 # define GTEST_OS_QNX 1
366 #endif // __CYGWIN__
367 
368 #ifndef GTEST_LANG_CXX11
369 // gcc and clang define __GXX_EXPERIMENTAL_CXX0X__ when
370 // -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a
371 // value for __cplusplus, and recent versions of clang, gcc, and
372 // probably other compilers set that too in C++11 mode.
373 # if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L
374 // Compiling in at least C++11 mode.
375 # define GTEST_LANG_CXX11 1
376 # else
377 # define GTEST_LANG_CXX11 0
378 # endif
379 #endif
380 
381 // Brings in definitions for functions used in the testing::internal::posix
382 // namespace (read, write, close, chdir, isatty, stat). We do not currently
383 // use them on Windows Mobile.
384 #if !GTEST_OS_WINDOWS
385 // This assumes that non-Windows OSes provide unistd.h. For OSes where this
386 // is not the case, we need to include headers that provide the functions
387 // mentioned above.
388 # include <unistd.h>
389 # include <strings.h>
390 #elif !GTEST_OS_WINDOWS_MOBILE
391 # include <direct.h>
392 # include <io.h>
393 #endif
394 
395 #if GTEST_OS_LINUX_ANDROID
396 // Used to define __ANDROID_API__ matching the target NDK API level.
397 # include <android/api-level.h> // NOLINT
398 #endif
399 
400 // Defines this to true iff Google Test can use POSIX regular expressions.
401 #ifndef GTEST_HAS_POSIX_RE
402 # if GTEST_OS_LINUX_ANDROID
403 // On Android, <regex.h> is only available starting with Gingerbread.
404 # define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9)
405 # else
406 # define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)
407 # endif
408 #endif
409 
410 #if GTEST_HAS_POSIX_RE
411 
412 // On some platforms, <regex.h> needs someone to define size_t, and
413 // won't compile otherwise. We can #include it here as we already
414 // included <stdlib.h>, which is guaranteed to define size_t through
415 // <stddef.h>.
416 # include <regex.h> // NOLINT
417 
418 # define GTEST_USES_POSIX_RE 1
419 
420 #elif GTEST_OS_WINDOWS
421 
422 // <regex.h> is not available on Windows. Use our own simple regex
423 // implementation instead.
424 # define GTEST_USES_SIMPLE_RE 1
425 
426 #else
427 
428 // <regex.h> may not be available on this platform. Use our own
429 // simple regex implementation instead.
430 # define GTEST_USES_SIMPLE_RE 1
431 
432 #endif // GTEST_HAS_POSIX_RE
433 
434 #ifndef GTEST_HAS_EXCEPTIONS
435 // The user didn't tell us whether exceptions are enabled, so we need
436 // to figure it out.
437 # if defined(_MSC_VER) || defined(__BORLANDC__)
438 // MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS
439 // macro to enable exceptions, so we'll do the same.
440 // Assumes that exceptions are enabled by default.
441 # ifndef _HAS_EXCEPTIONS
442 # define _HAS_EXCEPTIONS 1
443 # endif // _HAS_EXCEPTIONS
444 # define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
445 # elif defined(__GNUC__) && __EXCEPTIONS
446 // gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.
447 # define GTEST_HAS_EXCEPTIONS 1
448 # elif defined(__SUNPRO_CC)
449 // Sun Pro CC supports exceptions. However, there is no compile-time way of
450 // detecting whether they are enabled or not. Therefore, we assume that
451 // they are enabled unless the user tells us otherwise.
452 # define GTEST_HAS_EXCEPTIONS 1
453 # elif defined(__IBMCPP__) && __EXCEPTIONS
454 // xlC defines __EXCEPTIONS to 1 iff exceptions are enabled.
455 # define GTEST_HAS_EXCEPTIONS 1
456 # elif defined(__HP_aCC)
457 // Exception handling is in effect by default in HP aCC compiler. It has to
458 // be turned of by +noeh compiler option if desired.
459 # define GTEST_HAS_EXCEPTIONS 1
460 # else
461 // For other compilers, we assume exceptions are disabled to be
462 // conservative.
463 # define GTEST_HAS_EXCEPTIONS 0
464 # endif // defined(_MSC_VER) || defined(__BORLANDC__)
465 #endif // GTEST_HAS_EXCEPTIONS
466 
467 #if !defined(GTEST_HAS_STD_STRING)
468 // Even though we don't use this macro any longer, we keep it in case
469 // some clients still depend on it.
470 # define GTEST_HAS_STD_STRING 1
471 #elif !GTEST_HAS_STD_STRING
472 // The user told us that ::std::string isn't available.
473 # error "Google Test cannot be used where ::std::string isn't available."
474 #endif // !defined(GTEST_HAS_STD_STRING)
475 
476 #ifndef GTEST_HAS_GLOBAL_STRING
477 // The user didn't tell us whether ::string is available, so we need
478 // to figure it out.
479 
480 # define GTEST_HAS_GLOBAL_STRING 0
481 
482 #endif // GTEST_HAS_GLOBAL_STRING
483 
484 #ifndef GTEST_HAS_STD_WSTRING
485 // The user didn't tell us whether ::std::wstring is available, so we need
486 // to figure it out.
487 // TODO(wan@google.com): uses autoconf to detect whether ::std::wstring
488 // is available.
489 
490 // Cygwin 1.7 and below doesn't support ::std::wstring.
491 // Solaris' libc++ doesn't support it either. Android has
492 // no support for it at least as recent as Froyo (2.2).
493 # define GTEST_HAS_STD_WSTRING \
494  (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))
495 
496 #endif // GTEST_HAS_STD_WSTRING
497 
498 #ifndef GTEST_HAS_GLOBAL_WSTRING
499 // The user didn't tell us whether ::wstring is available, so we need
500 // to figure it out.
501 # define GTEST_HAS_GLOBAL_WSTRING \
502  (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)
503 #endif // GTEST_HAS_GLOBAL_WSTRING
504 
505 // Determines whether RTTI is available.
506 #ifndef GTEST_HAS_RTTI
507 // The user didn't tell us whether RTTI is enabled, so we need to
508 // figure it out.
509 
510 # ifdef _MSC_VER
511 
512 # ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled.
513 # define GTEST_HAS_RTTI 1
514 # else
515 # define GTEST_HAS_RTTI 0
516 # endif
517 
518 // Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled.
519 # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302)
520 
521 # ifdef __GXX_RTTI
522 // When building against STLport with the Android NDK and with
523 // -frtti -fno-exceptions, the build fails at link time with undefined
524 // references to __cxa_bad_typeid. Note sure if STL or toolchain bug,
525 // so disable RTTI when detected.
526 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \
527  !defined(__EXCEPTIONS)
528 # define GTEST_HAS_RTTI 0
529 # else
530 # define GTEST_HAS_RTTI 1
531 # endif // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS
532 # else
533 # define GTEST_HAS_RTTI 0
534 # endif // __GXX_RTTI
535 
536 // Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends
537 // using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the
538 // first version with C++ support.
539 # elif defined(__clang__)
540 
541 # define GTEST_HAS_RTTI __has_feature(cxx_rtti)
542 
543 // Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
544 // both the typeid and dynamic_cast features are present.
545 # elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
546 
547 # ifdef __RTTI_ALL__
548 # define GTEST_HAS_RTTI 1
549 # else
550 # define GTEST_HAS_RTTI 0
551 # endif
552 
553 # else
554 
555 // For all other compilers, we assume RTTI is enabled.
556 # define GTEST_HAS_RTTI 1
557 
558 # endif // _MSC_VER
559 
560 #endif // GTEST_HAS_RTTI
561 
562 // It's this header's responsibility to #include <typeinfo> when RTTI
563 // is enabled.
564 #if GTEST_HAS_RTTI
565 # include <typeinfo>
566 #endif
567 
568 // Determines whether Google Test can use the pthreads library.
569 #ifndef GTEST_HAS_PTHREAD
570 // The user didn't tell us explicitly, so we assume pthreads support is
571 // available on Linux and Mac.
572 //
573 // To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
574 // to your compiler flags.
575 # define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \
576  || GTEST_OS_QNX)
577 #endif // GTEST_HAS_PTHREAD
578 
579 #if GTEST_HAS_PTHREAD
580 // gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is
581 // true.
582 # include <pthread.h> // NOLINT
583 
584 // For timespec and nanosleep, used below.
585 # include <time.h> // NOLINT
586 #endif
587 
588 // Determines whether Google Test can use tr1/tuple. You can define
589 // this macro to 0 to prevent Google Test from using tuple (any
590 // feature depending on tuple with be disabled in this mode).
591 #ifndef GTEST_HAS_TR1_TUPLE
592 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR)
593 // STLport, provided with the Android NDK, has neither <tr1/tuple> or <tuple>.
594 # define GTEST_HAS_TR1_TUPLE 0
595 # else
596 // The user didn't tell us not to do it, so we assume it's OK.
597 # define GTEST_HAS_TR1_TUPLE 1
598 # endif
599 #endif // GTEST_HAS_TR1_TUPLE
600 
601 // Determines whether Google Test's own tr1 tuple implementation
602 // should be used.
603 #ifndef GTEST_USE_OWN_TR1_TUPLE
604 // The user didn't tell us, so we need to figure it out.
605 
606 // We use our own TR1 tuple if we aren't sure the user has an
607 // implementation of it already. At this time, libstdc++ 4.0.0+ and
608 // MSVC 2010 are the only mainstream standard libraries that come
609 // with a TR1 tuple implementation. NVIDIA's CUDA NVCC compiler
610 // pretends to be GCC by defining __GNUC__ and friends, but cannot
611 // compile GCC's tuple implementation. MSVC 2008 (9.0) provides TR1
612 // tuple in a 323 MB Feature Pack download, which we cannot assume the
613 // user has. QNX's QCC compiler is a modified GCC but it doesn't
614 // support TR1 tuple. libc++ only provides std::tuple, in C++11 mode,
615 // and it can be used with some compilers that define __GNUC__.
616 # if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \
617  && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600
618 # define GTEST_ENV_HAS_TR1_TUPLE_ 1
619 # endif
620 
621 // C++11 specifies that <tuple> provides std::tuple. Use that if gtest is used
622 // in C++11 mode and libstdc++ isn't very old (binaries targeting OS X 10.6
623 // can build with clang but need to use gcc4.2's libstdc++).
624 # if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325)
625 # define GTEST_ENV_HAS_STD_TUPLE_ 1
626 # endif
627 
628 # if GTEST_ENV_HAS_TR1_TUPLE_ || GTEST_ENV_HAS_STD_TUPLE_
629 # define GTEST_USE_OWN_TR1_TUPLE 0
630 # else
631 # define GTEST_USE_OWN_TR1_TUPLE 1
632 # endif
633 
634 #endif // GTEST_USE_OWN_TR1_TUPLE
635 
636 // To avoid conditional compilation everywhere, we make it
637 // gtest-port.h's responsibility to #include the header implementing
638 // tr1/tuple.
639 #if GTEST_HAS_TR1_TUPLE
640 
641 # if GTEST_USE_OWN_TR1_TUPLE
642 // This file was GENERATED by command:
643 // pump.py gtest-tuple.h.pump
644 // DO NOT EDIT BY HAND!!!
645 
646 // Copyright 2009 Google Inc.
647 // All Rights Reserved.
648 //
649 // Redistribution and use in source and binary forms, with or without
650 // modification, are permitted provided that the following conditions are
651 // met:
652 //
653 // * Redistributions of source code must retain the above copyright
654 // notice, this list of conditions and the following disclaimer.
655 // * Redistributions in binary form must reproduce the above
656 // copyright notice, this list of conditions and the following disclaimer
657 // in the documentation and/or other materials provided with the
658 // distribution.
659 // * Neither the name of Google Inc. nor the names of its
660 // contributors may be used to endorse or promote products derived from
661 // this software without specific prior written permission.
662 //
663 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
664 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
665 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
666 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
667 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
668 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
669 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
670 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
671 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
672 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
673 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
674 //
675 // Author: wan@google.com (Zhanyong Wan)
676 
677 // Implements a subset of TR1 tuple needed by Google Test and Google Mock.
678 
679 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
680 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
681 
682 #include <utility> // For ::std::pair.
683 
684 // The compiler used in Symbian has a bug that prevents us from declaring the
685 // tuple template as a friend (it complains that tuple is redefined). This
686 // hack bypasses the bug by declaring the members that should otherwise be
687 // private as public.
688 // Sun Studio versions < 12 also have the above bug.
689 #if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)
690 # define GTEST_DECLARE_TUPLE_AS_FRIEND_ public:
691 #else
692 # define GTEST_DECLARE_TUPLE_AS_FRIEND_ \
693  template <GTEST_10_TYPENAMES_(U)> friend class tuple; \
694  private:
695 #endif
696 
697 // GTEST_n_TUPLE_(T) is the type of an n-tuple.
698 #define GTEST_0_TUPLE_(T) tuple<>
699 #define GTEST_1_TUPLE_(T) tuple<T##0, void, void, void, void, void, void, \
700  void, void, void>
701 #define GTEST_2_TUPLE_(T) tuple<T##0, T##1, void, void, void, void, void, \
702  void, void, void>
703 #define GTEST_3_TUPLE_(T) tuple<T##0, T##1, T##2, void, void, void, void, \
704  void, void, void>
705 #define GTEST_4_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, void, void, void, \
706  void, void, void>
707 #define GTEST_5_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, void, void, \
708  void, void, void>
709 #define GTEST_6_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, void, \
710  void, void, void>
711 #define GTEST_7_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
712  void, void, void>
713 #define GTEST_8_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
714  T##7, void, void>
715 #define GTEST_9_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
716  T##7, T##8, void>
717 #define GTEST_10_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
718  T##7, T##8, T##9>
719 
720 // GTEST_n_TYPENAMES_(T) declares a list of n typenames.
721 #define GTEST_0_TYPENAMES_(T)
722 #define GTEST_1_TYPENAMES_(T) typename T##0
723 #define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1
724 #define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2
725 #define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
726  typename T##3
727 #define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
728  typename T##3, typename T##4
729 #define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
730  typename T##3, typename T##4, typename T##5
731 #define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
732  typename T##3, typename T##4, typename T##5, typename T##6
733 #define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
734  typename T##3, typename T##4, typename T##5, typename T##6, typename T##7
735 #define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
736  typename T##3, typename T##4, typename T##5, typename T##6, \
737  typename T##7, typename T##8
738 #define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
739  typename T##3, typename T##4, typename T##5, typename T##6, \
740  typename T##7, typename T##8, typename T##9
741 
742 // In theory, defining stuff in the ::std namespace is undefined
743 // behavior. We can do this as we are playing the role of a standard
744 // library vendor.
745 namespace std
746 {
747 namespace tr1
748 {
749 
750 template <typename T0 = void, typename T1 = void, typename T2 = void,
751  typename T3 = void, typename T4 = void, typename T5 = void,
752  typename T6 = void, typename T7 = void, typename T8 = void,
753  typename T9 = void>
754 class tuple;
755 
756 // Anything in namespace gtest_internal is Google Test's INTERNAL
757 // IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code.
758 namespace gtest_internal
759 {
760 
761 // ByRef<T>::type is T if T is a reference; otherwise it's const T&.
762 template <typename T>
763 struct ByRef { typedef const T & type; }; // NOLINT
764 template <typename T>
765 struct ByRef<T &> { typedef T & type; }; // NOLINT
766 
767 // A handy wrapper for ByRef.
768 #define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type
769 
770 // AddRef<T>::type is T if T is a reference; otherwise it's T&. This
771 // is the same as tr1::add_reference<T>::type.
772 template <typename T>
773 struct AddRef { typedef T & type; }; // NOLINT
774 template <typename T>
775 struct AddRef<T &> { typedef T & type; }; // NOLINT
776 
777 // A handy wrapper for AddRef.
778 #define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef<T>::type
779 
780 // A helper for implementing get<k>().
781 template <int k> class Get;
782 
783 // A helper for implementing tuple_element<k, T>. kIndexValid is true
784 // iff k < the number of fields in tuple type T.
785 template <bool kIndexValid, int kIndex, class Tuple>
786 struct TupleElement;
787 
788 template <GTEST_10_TYPENAMES_(T)>
789 struct TupleElement<true, 0, GTEST_10_TUPLE_(T) >
790 {
791  typedef T0 type;
792 };
793 
794 template <GTEST_10_TYPENAMES_(T)>
795 struct TupleElement<true, 1, GTEST_10_TUPLE_(T) >
796 {
797  typedef T1 type;
798 };
799 
800 template <GTEST_10_TYPENAMES_(T)>
801 struct TupleElement<true, 2, GTEST_10_TUPLE_(T) >
802 {
803  typedef T2 type;
804 };
805 
806 template <GTEST_10_TYPENAMES_(T)>
807 struct TupleElement<true, 3, GTEST_10_TUPLE_(T) >
808 {
809  typedef T3 type;
810 };
811 
812 template <GTEST_10_TYPENAMES_(T)>
813 struct TupleElement<true, 4, GTEST_10_TUPLE_(T) >
814 {
815  typedef T4 type;
816 };
817 
818 template <GTEST_10_TYPENAMES_(T)>
819 struct TupleElement<true, 5, GTEST_10_TUPLE_(T) >
820 {
821  typedef T5 type;
822 };
823 
824 template <GTEST_10_TYPENAMES_(T)>
825 struct TupleElement<true, 6, GTEST_10_TUPLE_(T) >
826 {
827  typedef T6 type;
828 };
829 
830 template <GTEST_10_TYPENAMES_(T)>
831 struct TupleElement<true, 7, GTEST_10_TUPLE_(T) >
832 {
833  typedef T7 type;
834 };
835 
836 template <GTEST_10_TYPENAMES_(T)>
837 struct TupleElement<true, 8, GTEST_10_TUPLE_(T) >
838 {
839  typedef T8 type;
840 };
841 
842 template <GTEST_10_TYPENAMES_(T)>
843 struct TupleElement<true, 9, GTEST_10_TUPLE_(T) >
844 {
845  typedef T9 type;
846 };
847 
848 } // namespace gtest_internal
849 
850 template <>
851 class tuple<>
852 {
853 public:
854  tuple() {}
855  tuple(const tuple & /* t */) {}
856  tuple & operator=(const tuple & /* t */) { return *this; }
857 };
858 
859 template <GTEST_1_TYPENAMES_(T)>
860 class GTEST_1_TUPLE_(T)
861 {
862 public:
863  template <int k> friend class gtest_internal::Get;
864 
865  tuple() : f0_() {}
866 
867  explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {}
868 
869  tuple(const tuple & t) : f0_(t.f0_) {}
870 
871  template <GTEST_1_TYPENAMES_(U)>
872  tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {}
873 
874  tuple & operator=(const tuple & t) { return CopyFrom(t); }
875 
876  template <GTEST_1_TYPENAMES_(U)>
877  tuple & operator=(const GTEST_1_TUPLE_(U)& t)
878  {
879  return CopyFrom(t);
880  }
881 
883 
884  template <GTEST_1_TYPENAMES_(U)>
885  tuple & CopyFrom(const GTEST_1_TUPLE_(U)& t)
886  {
887  f0_ = t.f0_;
888  return *this;
889  }
890 
891  T0 f0_;
892 };
893 
894 template <GTEST_2_TYPENAMES_(T)>
895 class GTEST_2_TUPLE_(T)
896 {
897 public:
898  template <int k> friend class gtest_internal::Get;
899 
900  tuple() : f0_(), f1_() {}
901 
902  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0),
903  f1_(f1) {}
904 
905  tuple(const tuple & t) : f0_(t.f0_), f1_(t.f1_) {}
906 
907  template <GTEST_2_TYPENAMES_(U)>
908  tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {}
909  template <typename U0, typename U1>
910  tuple(const ::std::pair<U0, U1> & p) : f0_(p.first), f1_(p.second) {}
911 
912  tuple & operator=(const tuple & t) { return CopyFrom(t); }
913 
914  template <GTEST_2_TYPENAMES_(U)>
915  tuple & operator=(const GTEST_2_TUPLE_(U)& t)
916  {
917  return CopyFrom(t);
918  }
919  template <typename U0, typename U1>
920  tuple & operator=(const ::std::pair<U0, U1> & p)
921  {
922  f0_ = p.first;
923  f1_ = p.second;
924  return *this;
925  }
926 
928 
929  template <GTEST_2_TYPENAMES_(U)>
930  tuple & CopyFrom(const GTEST_2_TUPLE_(U)& t)
931  {
932  f0_ = t.f0_;
933  f1_ = t.f1_;
934  return *this;
935  }
936 
937  T0 f0_;
938  T1 f1_;
939 };
940 
941 template <GTEST_3_TYPENAMES_(T)>
942 class GTEST_3_TUPLE_(T)
943 {
944 public:
945  template <int k> friend class gtest_internal::Get;
946 
947  tuple() : f0_(), f1_(), f2_() {}
948 
949  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
950  GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {}
951 
952  tuple(const tuple & t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
953 
954  template <GTEST_3_TYPENAMES_(U)>
955  tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
956 
957  tuple & operator=(const tuple & t) { return CopyFrom(t); }
958 
959  template <GTEST_3_TYPENAMES_(U)>
960  tuple & operator=(const GTEST_3_TUPLE_(U)& t)
961  {
962  return CopyFrom(t);
963  }
964 
966 
967  template <GTEST_3_TYPENAMES_(U)>
968  tuple & CopyFrom(const GTEST_3_TUPLE_(U)& t)
969  {
970  f0_ = t.f0_;
971  f1_ = t.f1_;
972  f2_ = t.f2_;
973  return *this;
974  }
975 
976  T0 f0_;
977  T1 f1_;
978  T2 f2_;
979 };
980 
981 template <GTEST_4_TYPENAMES_(T)>
982 class GTEST_4_TUPLE_(T)
983 {
984 public:
985  template <int k> friend class gtest_internal::Get;
986 
987  tuple() : f0_(), f1_(), f2_(), f3_() {}
988 
989  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
990  GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2),
991  f3_(f3) {}
992 
993  tuple(const tuple & t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {}
994 
995  template <GTEST_4_TYPENAMES_(U)>
996  tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
997  f3_(t.f3_) {}
998 
999  tuple & operator=(const tuple & t) { return CopyFrom(t); }
1000 
1001  template <GTEST_4_TYPENAMES_(U)>
1002  tuple & operator=(const GTEST_4_TUPLE_(U)& t)
1003  {
1004  return CopyFrom(t);
1005  }
1006 
1008 
1009  template <GTEST_4_TYPENAMES_(U)>
1010  tuple & CopyFrom(const GTEST_4_TUPLE_(U)& t)
1011  {
1012  f0_ = t.f0_;
1013  f1_ = t.f1_;
1014  f2_ = t.f2_;
1015  f3_ = t.f3_;
1016  return *this;
1017  }
1018 
1019  T0 f0_;
1020  T1 f1_;
1021  T2 f2_;
1022  T3 f3_;
1023 };
1024 
1025 template <GTEST_5_TYPENAMES_(T)>
1026 class GTEST_5_TUPLE_(T)
1027 {
1028 public:
1029  template <int k> friend class gtest_internal::Get;
1030 
1031  tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {}
1032 
1033  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1034  GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3,
1035  GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {}
1036 
1037  tuple(const tuple & t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1038  f4_(t.f4_) {}
1039 
1040  template <GTEST_5_TYPENAMES_(U)>
1041  tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1042  f3_(t.f3_), f4_(t.f4_) {}
1043 
1044  tuple & operator=(const tuple & t) { return CopyFrom(t); }
1045 
1046  template <GTEST_5_TYPENAMES_(U)>
1047  tuple & operator=(const GTEST_5_TUPLE_(U)& t)
1048  {
1049  return CopyFrom(t);
1050  }
1051 
1053 
1054  template <GTEST_5_TYPENAMES_(U)>
1055  tuple & CopyFrom(const GTEST_5_TUPLE_(U)& t)
1056  {
1057  f0_ = t.f0_;
1058  f1_ = t.f1_;
1059  f2_ = t.f2_;
1060  f3_ = t.f3_;
1061  f4_ = t.f4_;
1062  return *this;
1063  }
1064 
1065  T0 f0_;
1066  T1 f1_;
1067  T2 f2_;
1068  T3 f3_;
1069  T4 f4_;
1070 };
1071 
1072 template <GTEST_6_TYPENAMES_(T)>
1073 class GTEST_6_TUPLE_(T)
1074 {
1075 public:
1076  template <int k> friend class gtest_internal::Get;
1077 
1078  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {}
1079 
1080  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1082  GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
1083  f5_(f5) {}
1084 
1085  tuple(const tuple & t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1086  f4_(t.f4_), f5_(t.f5_) {}
1087 
1088  template <GTEST_6_TYPENAMES_(U)>
1089  tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1090  f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {}
1091 
1092  tuple & operator=(const tuple & t) { return CopyFrom(t); }
1093 
1094  template <GTEST_6_TYPENAMES_(U)>
1095  tuple & operator=(const GTEST_6_TUPLE_(U)& t)
1096  {
1097  return CopyFrom(t);
1098  }
1099 
1101 
1102  template <GTEST_6_TYPENAMES_(U)>
1103  tuple & CopyFrom(const GTEST_6_TUPLE_(U)& t)
1104  {
1105  f0_ = t.f0_;
1106  f1_ = t.f1_;
1107  f2_ = t.f2_;
1108  f3_ = t.f3_;
1109  f4_ = t.f4_;
1110  f5_ = t.f5_;
1111  return *this;
1112  }
1113 
1114  T0 f0_;
1115  T1 f1_;
1116  T2 f2_;
1117  T3 f3_;
1118  T4 f4_;
1119  T5 f5_;
1120 };
1121 
1122 template <GTEST_7_TYPENAMES_(T)>
1123 class GTEST_7_TUPLE_(T)
1124 {
1125 public:
1126  template <int k> friend class gtest_internal::Get;
1127 
1128  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {}
1129 
1130  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1132  GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2),
1133  f3_(f3), f4_(f4), f5_(f5), f6_(f6) {}
1134 
1135  tuple(const tuple & t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1136  f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
1137 
1138  template <GTEST_7_TYPENAMES_(U)>
1139  tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1140  f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
1141 
1142  tuple & operator=(const tuple & t) { return CopyFrom(t); }
1143 
1144  template <GTEST_7_TYPENAMES_(U)>
1145  tuple & operator=(const GTEST_7_TUPLE_(U)& t)
1146  {
1147  return CopyFrom(t);
1148  }
1149 
1151 
1152  template <GTEST_7_TYPENAMES_(U)>
1153  tuple & CopyFrom(const GTEST_7_TUPLE_(U)& t)
1154  {
1155  f0_ = t.f0_;
1156  f1_ = t.f1_;
1157  f2_ = t.f2_;
1158  f3_ = t.f3_;
1159  f4_ = t.f4_;
1160  f5_ = t.f5_;
1161  f6_ = t.f6_;
1162  return *this;
1163  }
1164 
1165  T0 f0_;
1166  T1 f1_;
1167  T2 f2_;
1168  T3 f3_;
1169  T4 f4_;
1170  T5 f5_;
1171  T6 f6_;
1172 };
1173 
1174 template <GTEST_8_TYPENAMES_(T)>
1175 class GTEST_8_TUPLE_(T)
1176 {
1177 public:
1178  template <int k> friend class gtest_internal::Get;
1179 
1180  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {}
1181 
1182  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1184  GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6,
1185  GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
1186  f5_(f5), f6_(f6), f7_(f7) {}
1187 
1188  tuple(const tuple & t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1189  f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
1190 
1191  template <GTEST_8_TYPENAMES_(U)>
1192  tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1193  f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
1194 
1195  tuple & operator=(const tuple & t) { return CopyFrom(t); }
1196 
1197  template <GTEST_8_TYPENAMES_(U)>
1198  tuple & operator=(const GTEST_8_TUPLE_(U)& t)
1199  {
1200  return CopyFrom(t);
1201  }
1202 
1204 
1205  template <GTEST_8_TYPENAMES_(U)>
1206  tuple & CopyFrom(const GTEST_8_TUPLE_(U)& t)
1207  {
1208  f0_ = t.f0_;
1209  f1_ = t.f1_;
1210  f2_ = t.f2_;
1211  f3_ = t.f3_;
1212  f4_ = t.f4_;
1213  f5_ = t.f5_;
1214  f6_ = t.f6_;
1215  f7_ = t.f7_;
1216  return *this;
1217  }
1218 
1219  T0 f0_;
1220  T1 f1_;
1221  T2 f2_;
1222  T3 f3_;
1223  T4 f4_;
1224  T5 f5_;
1225  T6 f6_;
1226  T7 f7_;
1227 };
1228 
1229 template <GTEST_9_TYPENAMES_(T)>
1230 class GTEST_9_TUPLE_(T)
1231 {
1232 public:
1233  template <int k> friend class gtest_internal::Get;
1234 
1235  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {}
1236 
1237  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1240  GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
1241  f5_(f5), f6_(f6), f7_(f7), f8_(f8) {}
1242 
1243  tuple(const tuple & t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1244  f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
1245 
1246  template <GTEST_9_TYPENAMES_(U)>
1247  tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1248  f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
1249 
1250  tuple & operator=(const tuple & t) { return CopyFrom(t); }
1251 
1252  template <GTEST_9_TYPENAMES_(U)>
1253  tuple & operator=(const GTEST_9_TUPLE_(U)& t)
1254  {
1255  return CopyFrom(t);
1256  }
1257 
1259 
1260  template <GTEST_9_TYPENAMES_(U)>
1261  tuple & CopyFrom(const GTEST_9_TUPLE_(U)& t)
1262  {
1263  f0_ = t.f0_;
1264  f1_ = t.f1_;
1265  f2_ = t.f2_;
1266  f3_ = t.f3_;
1267  f4_ = t.f4_;
1268  f5_ = t.f5_;
1269  f6_ = t.f6_;
1270  f7_ = t.f7_;
1271  f8_ = t.f8_;
1272  return *this;
1273  }
1274 
1275  T0 f0_;
1276  T1 f1_;
1277  T2 f2_;
1278  T3 f3_;
1279  T4 f4_;
1280  T5 f5_;
1281  T6 f6_;
1282  T7 f7_;
1283  T8 f8_;
1284 };
1285 
1286 template <GTEST_10_TYPENAMES_(T)>
1287 class tuple
1288 {
1289 public:
1290  template <int k> friend class gtest_internal::Get;
1291 
1292  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(),
1293  f9_() {}
1294 
1295  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1298  GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2),
1299  f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {}
1300 
1301  tuple(const tuple & t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1302  f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {}
1303 
1304  template <GTEST_10_TYPENAMES_(U)>
1305  tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1306  f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_),
1307  f9_(t.f9_) {}
1308 
1309  tuple & operator=(const tuple & t) { return CopyFrom(t); }
1310 
1311  template <GTEST_10_TYPENAMES_(U)>
1313  {
1314  return CopyFrom(t);
1315  }
1316 
1318 
1319  template <GTEST_10_TYPENAMES_(U)>
1321  {
1322  f0_ = t.f0_;
1323  f1_ = t.f1_;
1324  f2_ = t.f2_;
1325  f3_ = t.f3_;
1326  f4_ = t.f4_;
1327  f5_ = t.f5_;
1328  f6_ = t.f6_;
1329  f7_ = t.f7_;
1330  f8_ = t.f8_;
1331  f9_ = t.f9_;
1332  return *this;
1333  }
1334 
1335  T0 f0_;
1336  T1 f1_;
1337  T2 f2_;
1338  T3 f3_;
1339  T4 f4_;
1340  T5 f5_;
1341  T6 f6_;
1342  T7 f7_;
1343  T8 f8_;
1344  T9 f9_;
1345 };
1346 
1347 // 6.1.3.2 Tuple creation functions.
1348 
1349 // Known limitations: we don't support passing an
1350 // std::tr1::reference_wrapper<T> to make_tuple(). And we don't
1351 // implement tie().
1352 
1353 inline tuple<> make_tuple() { return tuple<>(); }
1354 
1355 template <GTEST_1_TYPENAMES_(T)>
1356 inline GTEST_1_TUPLE_(T) make_tuple(const T0 & f0)
1357 {
1358  return GTEST_1_TUPLE_(T)(f0);
1359 }
1360 
1361 template <GTEST_2_TYPENAMES_(T)>
1362 inline GTEST_2_TUPLE_(T) make_tuple(const T0 & f0, const T1 & f1)
1363 {
1364  return GTEST_2_TUPLE_(T)(f0, f1);
1365 }
1366 
1367 template <GTEST_3_TYPENAMES_(T)>
1368 inline GTEST_3_TUPLE_(T) make_tuple(const T0 & f0, const T1 & f1, const T2 & f2)
1369 {
1370  return GTEST_3_TUPLE_(T)(f0, f1, f2);
1371 }
1372 
1373 template <GTEST_4_TYPENAMES_(T)>
1374 inline GTEST_4_TUPLE_(T) make_tuple(const T0 & f0, const T1 & f1, const T2 & f2,
1375  const T3 & f3)
1376 {
1377  return GTEST_4_TUPLE_(T)(f0, f1, f2, f3);
1378 }
1379 
1380 template <GTEST_5_TYPENAMES_(T)>
1381 inline GTEST_5_TUPLE_(T) make_tuple(const T0 & f0, const T1 & f1, const T2 & f2,
1382  const T3 & f3, const T4 & f4)
1383 {
1384  return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4);
1385 }
1386 
1387 template <GTEST_6_TYPENAMES_(T)>
1388 inline GTEST_6_TUPLE_(T) make_tuple(const T0 & f0, const T1 & f1, const T2 & f2,
1389  const T3 & f3, const T4 & f4, const T5 & f5)
1390 {
1391  return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5);
1392 }
1393 
1394 template <GTEST_7_TYPENAMES_(T)>
1395 inline GTEST_7_TUPLE_(T) make_tuple(const T0 & f0, const T1 & f1, const T2 & f2,
1396  const T3 & f3, const T4 & f4, const T5 & f5, const T6 & f6)
1397 {
1398  return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6);
1399 }
1400 
1401 template <GTEST_8_TYPENAMES_(T)>
1402 inline GTEST_8_TUPLE_(T) make_tuple(const T0 & f0, const T1 & f1, const T2 & f2,
1403  const T3 & f3, const T4 & f4, const T5 & f5, const T6 & f6, const T7 & f7)
1404 {
1405  return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7);
1406 }
1407 
1408 template <GTEST_9_TYPENAMES_(T)>
1409 inline GTEST_9_TUPLE_(T) make_tuple(const T0 & f0, const T1 & f1, const T2 & f2,
1410  const T3 & f3, const T4 & f4, const T5 & f5, const T6 & f6, const T7 & f7,
1411  const T8 & f8)
1412 {
1413  return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8);
1414 }
1415 
1416 template <GTEST_10_TYPENAMES_(T)>
1417 inline GTEST_10_TUPLE_(T) make_tuple(const T0 & f0, const T1 & f1, const T2 & f2,
1418  const T3 & f3, const T4 & f4, const T5 & f5, const T6 & f6, const T7 & f7,
1419  const T8 & f8, const T9 & f9)
1420 {
1421  return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9);
1422 }
1423 
1424 // 6.1.3.3 Tuple helper classes.
1425 
1426 template <typename Tuple> struct tuple_size;
1427 
1428 template <GTEST_0_TYPENAMES_(T)>
1429 struct tuple_size<GTEST_0_TUPLE_(T) >
1430 {
1431  static const int value = 0;
1432 };
1433 
1434 template <GTEST_1_TYPENAMES_(T)>
1435 struct tuple_size<GTEST_1_TUPLE_(T) >
1436 {
1437  static const int value = 1;
1438 };
1439 
1440 template <GTEST_2_TYPENAMES_(T)>
1441 struct tuple_size<GTEST_2_TUPLE_(T) >
1442 {
1443  static const int value = 2;
1444 };
1445 
1446 template <GTEST_3_TYPENAMES_(T)>
1447 struct tuple_size<GTEST_3_TUPLE_(T) >
1448 {
1449  static const int value = 3;
1450 };
1451 
1452 template <GTEST_4_TYPENAMES_(T)>
1453 struct tuple_size<GTEST_4_TUPLE_(T) >
1454 {
1455  static const int value = 4;
1456 };
1457 
1458 template <GTEST_5_TYPENAMES_(T)>
1459 struct tuple_size<GTEST_5_TUPLE_(T) >
1460 {
1461  static const int value = 5;
1462 };
1463 
1464 template <GTEST_6_TYPENAMES_(T)>
1465 struct tuple_size<GTEST_6_TUPLE_(T) >
1466 {
1467  static const int value = 6;
1468 };
1469 
1470 template <GTEST_7_TYPENAMES_(T)>
1471 struct tuple_size<GTEST_7_TUPLE_(T) >
1472 {
1473  static const int value = 7;
1474 };
1475 
1476 template <GTEST_8_TYPENAMES_(T)>
1477 struct tuple_size<GTEST_8_TUPLE_(T) >
1478 {
1479  static const int value = 8;
1480 };
1481 
1482 template <GTEST_9_TYPENAMES_(T)>
1483 struct tuple_size<GTEST_9_TUPLE_(T) >
1484 {
1485  static const int value = 9;
1486 };
1487 
1488 template <GTEST_10_TYPENAMES_(T)>
1489 struct tuple_size<GTEST_10_TUPLE_(T) >
1490 {
1491  static const int value = 10;
1492 };
1493 
1494 template <int k, class Tuple>
1495 struct tuple_element
1496 {
1497  typedef typename gtest_internal::TupleElement <
1498  k < (tuple_size<Tuple>::value), k, Tuple>::type type;
1499 };
1500 
1501 #define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type
1502 
1503 // 6.1.3.4 Element access.
1504 
1505 namespace gtest_internal
1506 {
1507 
1508 template <>
1509 class Get<0>
1510 {
1511 public:
1512  template <class Tuple>
1514  Field(Tuple & t) { return t.f0_; } // NOLINT
1515 
1516  template <class Tuple>
1518  ConstField(const Tuple & t) { return t.f0_; }
1519 };
1520 
1521 template <>
1522 class Get<1>
1523 {
1524 public:
1525  template <class Tuple>
1527  Field(Tuple & t) { return t.f1_; } // NOLINT
1528 
1529  template <class Tuple>
1531  ConstField(const Tuple & t) { return t.f1_; }
1532 };
1533 
1534 template <>
1535 class Get<2>
1536 {
1537 public:
1538  template <class Tuple>
1540  Field(Tuple & t) { return t.f2_; } // NOLINT
1541 
1542  template <class Tuple>
1544  ConstField(const Tuple & t) { return t.f2_; }
1545 };
1546 
1547 template <>
1548 class Get<3>
1549 {
1550 public:
1551  template <class Tuple>
1553  Field(Tuple & t) { return t.f3_; } // NOLINT
1554 
1555  template <class Tuple>
1557  ConstField(const Tuple & t) { return t.f3_; }
1558 };
1559 
1560 template <>
1561 class Get<4>
1562 {
1563 public:
1564  template <class Tuple>
1566  Field(Tuple & t) { return t.f4_; } // NOLINT
1567 
1568  template <class Tuple>
1570  ConstField(const Tuple & t) { return t.f4_; }
1571 };
1572 
1573 template <>
1574 class Get<5>
1575 {
1576 public:
1577  template <class Tuple>
1579  Field(Tuple & t) { return t.f5_; } // NOLINT
1580 
1581  template <class Tuple>
1583  ConstField(const Tuple & t) { return t.f5_; }
1584 };
1585 
1586 template <>
1587 class Get<6>
1588 {
1589 public:
1590  template <class Tuple>
1592  Field(Tuple & t) { return t.f6_; } // NOLINT
1593 
1594  template <class Tuple>
1596  ConstField(const Tuple & t) { return t.f6_; }
1597 };
1598 
1599 template <>
1600 class Get<7>
1601 {
1602 public:
1603  template <class Tuple>
1605  Field(Tuple & t) { return t.f7_; } // NOLINT
1606 
1607  template <class Tuple>
1609  ConstField(const Tuple & t) { return t.f7_; }
1610 };
1611 
1612 template <>
1613 class Get<8>
1614 {
1615 public:
1616  template <class Tuple>
1618  Field(Tuple & t) { return t.f8_; } // NOLINT
1619 
1620  template <class Tuple>
1622  ConstField(const Tuple & t) { return t.f8_; }
1623 };
1624 
1625 template <>
1626 class Get<9>
1627 {
1628 public:
1629  template <class Tuple>
1631  Field(Tuple & t) { return t.f9_; } // NOLINT
1632 
1633  template <class Tuple>
1635  ConstField(const Tuple & t) { return t.f9_; }
1636 };
1637 
1638 } // namespace gtest_internal
1639 
1640 template <int k, GTEST_10_TYPENAMES_(T)>
1642 get(GTEST_10_TUPLE_(T)& t)
1643 {
1645 }
1646 
1647 template <int k, GTEST_10_TYPENAMES_(T)>
1649 get(const GTEST_10_TUPLE_(T)& t)
1650 {
1652 }
1653 
1654 // 6.1.3.5 Relational operators
1655 
1656 // We only implement == and !=, as we don't have a need for the rest yet.
1657 
1658 namespace gtest_internal
1659 {
1660 
1661 // SameSizeTuplePrefixComparator<k, k>::Eq(t1, t2) returns true if the
1662 // first k fields of t1 equals the first k fields of t2.
1663 // SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if
1664 // k1 != k2.
1665 template <int kSize1, int kSize2>
1667 
1668 template <>
1669 struct SameSizeTuplePrefixComparator<0, 0>
1670 {
1671  template <class Tuple1, class Tuple2>
1672  static bool Eq(const Tuple1 & /* t1 */, const Tuple2 & /* t2 */)
1673  {
1674  return true;
1675  }
1676 };
1677 
1678 template <int k>
1679 struct SameSizeTuplePrefixComparator<k, k>
1680 {
1681  template <class Tuple1, class Tuple2>
1682  static bool Eq(const Tuple1 & t1, const Tuple2 & t2)
1683  {
1684  return SameSizeTuplePrefixComparator < k - 1, k - 1 >::Eq(t1, t2) &&
1685  ::std::tr1::get < k - 1 > (t1) == ::std::tr1::get < k - 1 > (t2);
1686  }
1687 };
1688 
1689 } // namespace gtest_internal
1690 
1691 template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
1692 inline bool operator==(const GTEST_10_TUPLE_(T)& t,
1693  const GTEST_10_TUPLE_(U)& u)
1694 {
1698 }
1699 
1700 template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
1701 inline bool operator!=(const GTEST_10_TUPLE_(T)& t,
1702  const GTEST_10_TUPLE_(U)& u) { return !(t == u); }
1703 
1704 // 6.1.4 Pairs.
1705 // Unimplemented.
1706 
1707 } // namespace tr1
1708 } // namespace std
1709 
1710 #undef GTEST_0_TUPLE_
1711 #undef GTEST_1_TUPLE_
1712 #undef GTEST_2_TUPLE_
1713 #undef GTEST_3_TUPLE_
1714 #undef GTEST_4_TUPLE_
1715 #undef GTEST_5_TUPLE_
1716 #undef GTEST_6_TUPLE_
1717 #undef GTEST_7_TUPLE_
1718 #undef GTEST_8_TUPLE_
1719 #undef GTEST_9_TUPLE_
1720 #undef GTEST_10_TUPLE_
1721 
1722 #undef GTEST_0_TYPENAMES_
1723 #undef GTEST_1_TYPENAMES_
1724 #undef GTEST_2_TYPENAMES_
1725 #undef GTEST_3_TYPENAMES_
1726 #undef GTEST_4_TYPENAMES_
1727 #undef GTEST_5_TYPENAMES_
1728 #undef GTEST_6_TYPENAMES_
1729 #undef GTEST_7_TYPENAMES_
1730 #undef GTEST_8_TYPENAMES_
1731 #undef GTEST_9_TYPENAMES_
1732 #undef GTEST_10_TYPENAMES_
1733 
1734 #undef GTEST_DECLARE_TUPLE_AS_FRIEND_
1735 #undef GTEST_BY_REF_
1736 #undef GTEST_ADD_REF_
1737 #undef GTEST_TUPLE_ELEMENT_
1738 
1739 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
1740 # elif GTEST_ENV_HAS_STD_TUPLE_
1741 # include <tuple>
1742 // C++11 puts its tuple into the ::std namespace rather than
1743 // ::std::tr1. gtest expects tuple to live in ::std::tr1, so put it there.
1744 // This causes undefined behavior, but supported compilers react in
1745 // the way we intend.
1746 namespace std
1747 {
1748 namespace tr1
1749 {
1752 using ::std::tuple;
1753 using ::std::tuple_element;
1754 using ::std::tuple_size;
1755 }
1756 }
1757 
1758 # elif GTEST_OS_SYMBIAN
1759 
1760 // On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to
1761 // use STLport's tuple implementation, which unfortunately doesn't
1762 // work as the copy of STLport distributed with Symbian is incomplete.
1763 // By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to
1764 // use its own tuple implementation.
1765 # ifdef BOOST_HAS_TR1_TUPLE
1766 # undef BOOST_HAS_TR1_TUPLE
1767 # endif // BOOST_HAS_TR1_TUPLE
1768 
1769 // This prevents <boost/tr1/detail/config.hpp>, which defines
1770 // BOOST_HAS_TR1_TUPLE, from being #included by Boost's <tuple>.
1771 # define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
1772 # include <tuple>
1773 
1774 # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000)
1775 // GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header. This does
1776 // not conform to the TR1 spec, which requires the header to be <tuple>.
1777 
1778 # if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
1779 // Until version 4.3.2, gcc has a bug that causes <tr1/functional>,
1780 // which is #included by <tr1/tuple>, to not compile when RTTI is
1781 // disabled. _TR1_FUNCTIONAL is the header guard for
1782 // <tr1/functional>. Hence the following #define is a hack to prevent
1783 // <tr1/functional> from being included.
1784 # define _TR1_FUNCTIONAL 1
1785 # include <tr1/tuple>
1786 # undef _TR1_FUNCTIONAL // Allows the user to #include
1787 // <tr1/functional> if he chooses to.
1788 # else
1789 # include <tr1/tuple> // NOLINT
1790 # endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
1791 
1792 # else
1793 // If the compiler is not GCC 4.0+, we assume the user is using a
1794 // spec-conforming TR1 implementation.
1795 # include <tuple> // NOLINT
1796 # endif // GTEST_USE_OWN_TR1_TUPLE
1797 
1798 #endif // GTEST_HAS_TR1_TUPLE
1799 
1800 // Determines whether clone(2) is supported.
1801 // Usually it will only be available on Linux, excluding
1802 // Linux on the Itanium architecture.
1803 // Also see http://linux.die.net/man/2/clone.
1804 #ifndef GTEST_HAS_CLONE
1805 // The user didn't tell us, so we need to figure it out.
1806 
1807 # if GTEST_OS_LINUX && !defined(__ia64__)
1808 # if GTEST_OS_LINUX_ANDROID
1809 // On Android, clone() is only available on ARM starting with Gingerbread.
1810 # if defined(__arm__) && __ANDROID_API__ >= 9
1811 # define GTEST_HAS_CLONE 1
1812 # else
1813 # define GTEST_HAS_CLONE 0
1814 # endif
1815 # else
1816 # define GTEST_HAS_CLONE 1
1817 # endif
1818 # else
1819 # define GTEST_HAS_CLONE 0
1820 # endif // GTEST_OS_LINUX && !defined(__ia64__)
1821 
1822 #endif // GTEST_HAS_CLONE
1823 
1824 // Determines whether to support stream redirection. This is used to test
1825 // output correctness and to implement death tests.
1826 #ifndef GTEST_HAS_STREAM_REDIRECTION
1827 // By default, we assume that stream redirection is supported on all
1828 // platforms except known mobile ones.
1829 # if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN
1830 # define GTEST_HAS_STREAM_REDIRECTION 0
1831 # else
1832 # define GTEST_HAS_STREAM_REDIRECTION 1
1833 # endif // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN
1834 #endif // GTEST_HAS_STREAM_REDIRECTION
1835 
1836 // Determines whether to support death tests.
1837 // Google Test does not support death tests for VC 7.1 and earlier as
1838 // abort() in a VC 7.1 application compiled as GUI in debug config
1839 // pops up a dialog window that cannot be suppressed programmatically.
1840 #if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
1841  (GTEST_OS_MAC && !GTEST_OS_IOS) || GTEST_OS_IOS_SIMULATOR || \
1842  (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
1843  GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
1844  GTEST_OS_OPENBSD || GTEST_OS_QNX)
1845 # define GTEST_HAS_DEATH_TEST 1
1846 # include <vector> // NOLINT
1847 #endif
1848 
1849 // We don't support MSVC 7.1 with exceptions disabled now. Therefore
1850 // all the compilers we care about are adequate for supporting
1851 // value-parameterized tests.
1852 #define GTEST_HAS_PARAM_TEST 1
1853 
1854 // Determines whether to support type-driven tests.
1855 
1856 // Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
1857 // Sun Pro CC, IBM Visual Age, and HP aCC support.
1858 #if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \
1859  defined(__IBMCPP__) || defined(__HP_aCC)
1860 # define GTEST_HAS_TYPED_TEST 1
1861 # define GTEST_HAS_TYPED_TEST_P 1
1862 #endif
1863 
1864 // Determines whether to support Combine(). This only makes sense when
1865 // value-parameterized tests are enabled. The implementation doesn't
1866 // work on Sun Studio since it doesn't understand templated conversion
1867 // operators.
1868 #if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)
1869 # define GTEST_HAS_COMBINE 1
1870 #endif
1871 
1872 // Determines whether the system compiler uses UTF-16 for encoding wide strings.
1873 #define GTEST_WIDE_STRING_USES_UTF16_ \
1874  (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
1875 
1876 // Determines whether test results can be streamed to a socket.
1877 #if GTEST_OS_LINUX
1878 # define GTEST_CAN_STREAM_RESULTS_ 1
1879 #endif
1880 
1881 // Defines some utility macros.
1882 
1883 // The GNU compiler emits a warning if nested "if" statements are followed by
1884 // an "else" statement and braces are not used to explicitly disambiguate the
1885 // "else" binding. This leads to problems with code like:
1886 //
1887 // if (gate)
1888 // ASSERT_*(condition) << "Some message";
1889 //
1890 // The "switch (0) case 0:" idiom is used to suppress this.
1891 #ifdef __INTEL_COMPILER
1892 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_
1893 #else
1894 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT
1895 #endif
1896 
1897 // Use this annotation at the end of a struct/class definition to
1898 // prevent the compiler from optimizing away instances that are never
1899 // used. This is useful when all interesting logic happens inside the
1900 // c'tor and / or d'tor. Example:
1901 //
1902 // struct Foo {
1903 // Foo() { ... }
1904 // } GTEST_ATTRIBUTE_UNUSED_;
1905 //
1906 // Also use it after a variable or parameter declaration to tell the
1907 // compiler the variable/parameter does not have to be used.
1908 #if defined(__GNUC__) && !defined(COMPILER_ICC)
1909 # define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
1910 #else
1911 # define GTEST_ATTRIBUTE_UNUSED_
1912 #endif
1913 
1914 // A macro to disallow operator=
1915 // This should be used in the private: declarations for a class.
1916 #define GTEST_DISALLOW_ASSIGN_(type)\
1917  void operator=(type const &)
1918 
1919 // A macro to disallow copy constructor and operator=
1920 // This should be used in the private: declarations for a class.
1921 #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
1922  type(type const &);\
1923  GTEST_DISALLOW_ASSIGN_(type)
1924 
1925 // Tell the compiler to warn about unused return values for functions declared
1926 // with this macro. The macro should be used on function declarations
1927 // following the argument list:
1928 //
1929 // Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;
1930 #if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC)
1931 # define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))
1932 #else
1933 # define GTEST_MUST_USE_RESULT_
1934 #endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC
1935 
1936 // Determine whether the compiler supports Microsoft's Structured Exception
1937 // Handling. This is supported by several Windows compilers but generally
1938 // does not exist on any other system.
1939 #ifndef GTEST_HAS_SEH
1940 // The user didn't tell us, so we need to figure it out.
1941 
1942 # if defined(_MSC_VER) || defined(__BORLANDC__)
1943 // These two compilers are known to support SEH.
1944 # define GTEST_HAS_SEH 1
1945 # else
1946 // Assume no SEH.
1947 # define GTEST_HAS_SEH 0
1948 # endif
1949 
1950 #endif // GTEST_HAS_SEH
1951 
1952 #ifdef _MSC_VER
1953 
1954 # if GTEST_LINKED_AS_SHARED_LIBRARY
1955 # define GTEST_API_ __declspec(dllimport)
1956 # elif GTEST_CREATE_SHARED_LIBRARY
1957 # define GTEST_API_ __declspec(dllexport)
1958 # endif
1959 
1960 #endif // _MSC_VER
1961 
1962 #ifndef GTEST_API_
1963 # define GTEST_API_
1964 #endif
1965 
1966 #ifdef __GNUC__
1967 // Ask the compiler to never inline a given function.
1968 # define GTEST_NO_INLINE_ __attribute__((noinline))
1969 #else
1970 # define GTEST_NO_INLINE_
1971 #endif
1972 
1973 // _LIBCPP_VERSION is defined by the libc++ library from the LLVM project.
1974 #if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
1975 # define GTEST_HAS_CXXABI_H_ 1
1976 #else
1977 # define GTEST_HAS_CXXABI_H_ 0
1978 #endif
1979 
1980 namespace testing
1981 {
1982 
1983 class Message;
1984 
1985 namespace internal
1986 {
1987 
1988 // A secret type that Google Test users don't know about. It has no
1989 // definition on purpose. Therefore it's impossible to create a
1990 // Secret object, which is what we want.
1991 class Secret;
1992 
1993 // The GTEST_COMPILE_ASSERT_ macro can be used to verify that a compile time
1994 // expression is true. For example, you could use it to verify the
1995 // size of a static array:
1996 //
1997 // GTEST_COMPILE_ASSERT_(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
1998 // content_type_names_incorrect_size);
1999 //
2000 // or to make sure a struct is smaller than a certain size:
2001 //
2002 // GTEST_COMPILE_ASSERT_(sizeof(foo) < 128, foo_too_large);
2003 //
2004 // The second argument to the macro is the name of the variable. If
2005 // the expression is false, most compilers will issue a warning/error
2006 // containing the name of the variable.
2007 
2008 template <bool>
2009 struct CompileAssert
2010 {
2011 };
2012 
2013 #define GTEST_COMPILE_ASSERT_(expr, msg) \
2014  typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \
2015  msg[static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_
2016 
2017 // Implementation details of GTEST_COMPILE_ASSERT_:
2018 //
2019 // - GTEST_COMPILE_ASSERT_ works by defining an array type that has -1
2020 // elements (and thus is invalid) when the expression is false.
2021 //
2022 // - The simpler definition
2023 //
2024 // #define GTEST_COMPILE_ASSERT_(expr, msg) typedef char msg[(expr) ? 1 : -1]
2025 //
2026 // does not work, as gcc supports variable-length arrays whose sizes
2027 // are determined at run-time (this is gcc's extension and not part
2028 // of the C++ standard). As a result, gcc fails to reject the
2029 // following code with the simple definition:
2030 //
2031 // int foo;
2032 // GTEST_COMPILE_ASSERT_(foo, msg); // not supposed to compile as foo is
2033 // // not a compile-time constant.
2034 //
2035 // - By using the type CompileAssert<(bool(expr))>, we ensures that
2036 // expr is a compile-time constant. (Template arguments must be
2037 // determined at compile-time.)
2038 //
2039 // - The outter parentheses in CompileAssert<(bool(expr))> are necessary
2040 // to work around a bug in gcc 3.4.4 and 4.0.1. If we had written
2041 //
2042 // CompileAssert<bool(expr)>
2043 //
2044 // instead, these compilers will refuse to compile
2045 //
2046 // GTEST_COMPILE_ASSERT_(5 > 0, some_message);
2047 //
2048 // (They seem to think the ">" in "5 > 0" marks the end of the
2049 // template argument list.)
2050 //
2051 // - The array size is (bool(expr) ? 1 : -1), instead of simply
2052 //
2053 // ((expr) ? 1 : -1).
2054 //
2055 // This is to avoid running into a bug in MS VC 7.1, which
2056 // causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
2057 
2058 // StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h.
2059 //
2060 // This template is declared, but intentionally undefined.
2061 template <typename T1, typename T2>
2062 struct StaticAssertTypeEqHelper;
2063 
2064 template <typename T>
2065 struct StaticAssertTypeEqHelper<T, T> {};
2066 
2067 #if GTEST_HAS_GLOBAL_STRING
2069 #else
2071 #endif // GTEST_HAS_GLOBAL_STRING
2072 
2073 #if GTEST_HAS_GLOBAL_WSTRING
2075 #elif GTEST_HAS_STD_WSTRING
2077 #endif // GTEST_HAS_GLOBAL_WSTRING
2078 
2079 // A helper for suppressing warnings on constant condition. It just
2080 // returns 'condition'.
2081 GTEST_API_ bool IsTrue(bool condition);
2082 
2083 // Defines scoped_ptr.
2084 
2085 // This implementation of scoped_ptr is PARTIAL - it only contains
2086 // enough stuff to satisfy Google Test's need.
2087 template <typename T>
2088 class scoped_ptr
2089 {
2090 public:
2091  typedef T element_type;
2092 
2093  explicit scoped_ptr(T * p = NULL) : ptr_(p) {}
2094  ~scoped_ptr() { reset(); }
2095 
2096  T & operator*() const { return *ptr_; }
2097  T * operator->() const { return ptr_; }
2098  T * get() const { return ptr_; }
2099 
2100  T * release()
2101  {
2102  T * const ptr = ptr_;
2103  ptr_ = NULL;
2104  return ptr;
2105  }
2106 
2107  void reset(T * p = NULL)
2108  {
2109  if (p != ptr_)
2110  {
2111  if (IsTrue(sizeof(T) > 0)) // Makes sure T is a complete type.
2112  {
2113  delete ptr_;
2114  }
2115 
2116  ptr_ = p;
2117  }
2118  }
2119 
2120 private:
2121  T * ptr_;
2122 
2124 };
2125 
2126 // Defines RE.
2127 
2128 // A simple C++ wrapper for <regex.h>. It uses the POSIX Extended
2129 // Regular Expression syntax.
2130 class GTEST_API_ RE
2131 {
2132 public:
2133  // A copy constructor is required by the Standard to initialize object
2134  // references from r-values.
2135  RE(const RE & other) { Init(other.pattern()); }
2136 
2137  // Constructs an RE from a string.
2138  RE(const ::std::string & regex) { Init(regex.c_str()); } // NOLINT
2139 
2140 #if GTEST_HAS_GLOBAL_STRING
2141 
2142  RE(const ::string & regex) { Init(regex.c_str()); } // NOLINT
2143 
2144 #endif // GTEST_HAS_GLOBAL_STRING
2145 
2146  RE(const char * regex) { Init(regex); } // NOLINT
2147  ~RE();
2148 
2149  // Returns the string representation of the regex.
2150  const char * pattern() const { return pattern_; }
2151 
2152  // FullMatch(str, re) returns true iff regular expression re matches
2153  // the entire str.
2154  // PartialMatch(str, re) returns true iff regular expression re
2155  // matches a substring of str (including str itself).
2156  //
2157  // TODO(wan@google.com): make FullMatch() and PartialMatch() work
2158  // when str contains NUL characters.
2159  static bool FullMatch(const ::std::string & str, const RE & re)
2160  {
2161  return FullMatch(str.c_str(), re);
2162  }
2163  static bool PartialMatch(const ::std::string & str, const RE & re)
2164  {
2165  return PartialMatch(str.c_str(), re);
2166  }
2167 
2168 #if GTEST_HAS_GLOBAL_STRING
2169 
2170  static bool FullMatch(const ::string & str, const RE & re)
2171  {
2172  return FullMatch(str.c_str(), re);
2173  }
2174  static bool PartialMatch(const ::string & str, const RE & re)
2175  {
2176  return PartialMatch(str.c_str(), re);
2177  }
2178 
2179 #endif // GTEST_HAS_GLOBAL_STRING
2180 
2181  static bool FullMatch(const char * str, const RE & re);
2182  static bool PartialMatch(const char * str, const RE & re);
2183 
2184 private:
2185  void Init(const char * regex);
2186 
2187  // We use a const char* instead of an std::string, as Google Test used to be
2188  // used where std::string is not available. TODO(wan@google.com): change to
2189  // std::string.
2190  const char * pattern_;
2191  bool is_valid_;
2192 
2193 #if GTEST_USES_POSIX_RE
2194 
2195  regex_t full_regex_; // For FullMatch().
2196  regex_t partial_regex_; // For PartialMatch().
2197 
2198 #else // GTEST_USES_SIMPLE_RE
2199 
2200  const char * full_pattern_; // For FullMatch();
2201 
2202 #endif
2203 
2205 };
2206 
2207 // Formats a source file path and a line number as they would appear
2208 // in an error message from the compiler used to compile this code.
2209 GTEST_API_ ::std::string FormatFileLocation(const char * file, int line);
2210 
2211 // Formats a file location for compiler-independent XML output.
2212 // Although this function is not platform dependent, we put it next to
2213 // FormatFileLocation in order to contrast the two functions.
2215  int line);
2216 
2217 // Defines logging utilities:
2218 // GTEST_LOG_(severity) - logs messages at the specified severity level. The
2219 // message itself is streamed into the macro.
2220 // LogToStderr() - directs all log messages to stderr.
2221 // FlushInfoLog() - flushes informational log messages.
2222 
2224 {
2225  GTEST_INFO,
2226  GTEST_WARNING,
2227  GTEST_ERROR,
2228  GTEST_FATAL
2229 };
2230 
2231 // Formats log entry severity, provides a stream object for streaming the
2232 // log message, and terminates the message with a newline when going out of
2233 // scope.
2234 class GTEST_API_ GTestLog
2235 {
2236 public:
2237  GTestLog(GTestLogSeverity severity, const char * file, int line);
2238 
2239  // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
2240  ~GTestLog();
2241 
2242  ::std::ostream & GetStream() { return ::std::cerr; }
2243 
2244 private:
2245  const GTestLogSeverity severity_;
2246 
2248 };
2249 
2250 #define GTEST_LOG_(severity) \
2251  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
2252  __FILE__, __LINE__).GetStream()
2253 
2254 inline void LogToStderr() {}
2255 inline void FlushInfoLog() { fflush(NULL); }
2256 
2257 // INTERNAL IMPLEMENTATION - DO NOT USE.
2258 //
2259 // GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition
2260 // is not satisfied.
2261 // Synopsys:
2262 // GTEST_CHECK_(boolean_condition);
2263 // or
2264 // GTEST_CHECK_(boolean_condition) << "Additional message";
2265 //
2266 // This checks the condition and if the condition is not satisfied
2267 // it prints message about the condition violation, including the
2268 // condition itself, plus additional message streamed into it, if any,
2269 // and then it aborts the program. It aborts the program irrespective of
2270 // whether it is built in the debug mode or not.
2271 #define GTEST_CHECK_(condition) \
2272  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
2273  if (::testing::internal::IsTrue(condition)) \
2274  ; \
2275  else \
2276  GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
2277 
2278 // An all-mode assert to verify that the given POSIX-style function
2279 // call returns 0 (indicating success). Known limitation: this
2280 // doesn't expand to a balanced 'if' statement, so enclose the macro
2281 // in {} if you need to use it as the only statement in an 'if'
2282 // branch.
2283 #define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \
2284  if (const int gtest_error = (posix_call)) \
2285  GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
2286  << gtest_error
2287 
2288 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
2289 //
2290 // Use ImplicitCast_ as a safe version of static_cast for upcasting in
2291 // the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a
2292 // const Foo*). When you use ImplicitCast_, the compiler checks that
2293 // the cast is safe. Such explicit ImplicitCast_s are necessary in
2294 // surprisingly many situations where C++ demands an exact type match
2295 // instead of an argument type convertable to a target type.
2296 //
2297 // The syntax for using ImplicitCast_ is the same as for static_cast:
2298 //
2299 // ImplicitCast_<ToType>(expr)
2300 //
2301 // ImplicitCast_ would have been part of the C++ standard library,
2302 // but the proposal was submitted too late. It will probably make
2303 // its way into the language in the future.
2304 //
2305 // This relatively ugly name is intentional. It prevents clashes with
2306 // similar functions users may have (e.g., implicit_cast). The internal
2307 // namespace alone is not enough because the function can be found by ADL.
2308 template<typename To>
2309 inline To ImplicitCast_(To x) { return x; }
2310 
2311 // When you upcast (that is, cast a pointer from type Foo to type
2312 // SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts
2313 // always succeed. When you downcast (that is, cast a pointer from
2314 // type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
2315 // how do you know the pointer is really of type SubclassOfFoo? It
2316 // could be a bare Foo, or of type DifferentSubclassOfFoo. Thus,
2317 // when you downcast, you should use this macro. In debug mode, we
2318 // use dynamic_cast<> to double-check the downcast is legal (we die
2319 // if it's not). In normal mode, we do the efficient static_cast<>
2320 // instead. Thus, it's important to test in debug mode to make sure
2321 // the cast is legal!
2322 // This is the only place in the code we should use dynamic_cast<>.
2323 // In particular, you SHOULDN'T be using dynamic_cast<> in order to
2324 // do RTTI (eg code like this:
2325 // if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);
2326 // if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);
2327 // You should design the code some other way not to need this.
2328 //
2329 // This relatively ugly name is intentional. It prevents clashes with
2330 // similar functions users may have (e.g., down_cast). The internal
2331 // namespace alone is not enough because the function can be found by ADL.
2332 template<typename To, typename From> // use like this: DownCast_<T*>(foo);
2333 inline To DownCast_(From * f) // so we only accept pointers
2334 {
2335  // Ensures that To is a sub-type of From *. This test is here only
2336  // for compile-time type checking, and has no overhead in an
2337  // optimized build at run-time, as it will be optimized away
2338  // completely.
2339  if (false)
2340  {
2341  const To to = NULL;
2342  ::testing::internal::ImplicitCast_<From *>(to);
2343  }
2344 
2345 #if GTEST_HAS_RTTI
2346  // RTTI: debug mode only!
2347  GTEST_CHECK_(f == NULL || dynamic_cast<To>(f) != NULL);
2348 #endif
2349  return static_cast<To>(f);
2350 }
2351 
2352 // Downcasts the pointer of type Base to Derived.
2353 // Derived must be a subclass of Base. The parameter MUST
2354 // point to a class of type Derived, not any subclass of it.
2355 // When RTTI is available, the function performs a runtime
2356 // check to enforce this.
2357 template <class Derived, class Base>
2358 Derived * CheckedDowncastToActualType(Base * base)
2359 {
2360 #if GTEST_HAS_RTTI
2361  GTEST_CHECK_(typeid(*base) == typeid(Derived));
2362  return dynamic_cast<Derived *>(base); // NOLINT
2363 #else
2364  return static_cast<Derived *>(base); // Poor man's downcast.
2365 #endif
2366 }
2367 
2368 #if GTEST_HAS_STREAM_REDIRECTION
2369 
2370 // Defines the stderr capturer:
2371 // CaptureStdout - starts capturing stdout.
2372 // GetCapturedStdout - stops capturing stdout and returns the captured string.
2373 // CaptureStderr - starts capturing stderr.
2374 // GetCapturedStderr - stops capturing stderr and returns the captured string.
2375 //
2376 GTEST_API_ void CaptureStdout();
2378 GTEST_API_ void CaptureStderr();
2380 
2381 #endif // GTEST_HAS_STREAM_REDIRECTION
2382 
2383 
2384 #if GTEST_HAS_DEATH_TEST
2385 
2386 const ::std::vector<testing::internal::string> & GetInjectableArgvs();
2387 void SetInjectableArgvs(const ::std::vector<testing::internal::string> *
2388  new_argvs);
2389 
2390 // A copy of all command line arguments. Set by InitGoogleTest().
2391 extern ::std::vector<testing::internal::string> g_argvs;
2392 
2393 #endif // GTEST_HAS_DEATH_TEST
2394 
2395 // Defines synchronization primitives.
2396 
2397 #if GTEST_HAS_PTHREAD
2398 
2399 // Sleeps for (roughly) n milli-seconds. This function is only for
2400 // testing Google Test's own constructs. Don't use it in user tests,
2401 // either directly or indirectly.
2402 inline void SleepMilliseconds(int n)
2403 {
2404  const timespec time =
2405  {
2406  0, // 0 seconds.
2407  n * 1000L * 1000L, // And n ms.
2408  };
2409  nanosleep(&time, NULL);
2410 }
2411 
2412 // Allows a controller thread to pause execution of newly created
2413 // threads until notified. Instances of this class must be created
2414 // and destroyed in the controller thread.
2415 //
2416 // This class is only for testing Google Test's own constructs. Do not
2417 // use it in user tests, either directly or indirectly.
2418 class Notification
2419 {
2420 public:
2421  Notification() : notified_(false)
2422  {
2423  GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
2424  }
2425  ~Notification()
2426  {
2427  pthread_mutex_destroy(&mutex_);
2428  }
2429 
2430  // Notifies all threads created with this notification to start. Must
2431  // be called from the controller thread.
2432  void Notify()
2433  {
2434  pthread_mutex_lock(&mutex_);
2435  notified_ = true;
2436  pthread_mutex_unlock(&mutex_);
2437  }
2438 
2439  // Blocks until the controller thread notifies. Must be called from a test
2440  // thread.
2441  void WaitForNotification()
2442  {
2443  for (;;)
2444  {
2445  pthread_mutex_lock(&mutex_);
2446  const bool notified = notified_;
2447  pthread_mutex_unlock(&mutex_);
2448 
2449  if (notified)
2450  { break; }
2451 
2452  SleepMilliseconds(10);
2453  }
2454  }
2455 
2456 private:
2457  pthread_mutex_t mutex_;
2458  bool notified_;
2459 
2460  GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);
2461 };
2462 
2463 // As a C-function, ThreadFuncWithCLinkage cannot be templated itself.
2464 // Consequently, it cannot select a correct instantiation of ThreadWithParam
2465 // in order to call its Run(). Introducing ThreadWithParamBase as a
2466 // non-templated base class for ThreadWithParam allows us to bypass this
2467 // problem.
2468 class ThreadWithParamBase
2469 {
2470 public:
2471  virtual ~ThreadWithParamBase() {}
2472  virtual void Run() = 0;
2473 };
2474 
2475 // pthread_create() accepts a pointer to a function type with the C linkage.
2476 // According to the Standard (7.5/1), function types with different linkages
2477 // are different even if they are otherwise identical. Some compilers (for
2478 // example, SunStudio) treat them as different types. Since class methods
2479 // cannot be defined with C-linkage we need to define a free C-function to
2480 // pass into pthread_create().
2481 extern "C" inline void * ThreadFuncWithCLinkage(void * thread)
2482 {
2483  static_cast<ThreadWithParamBase *>(thread)->Run();
2484  return NULL;
2485 }
2486 
2487 // Helper class for testing Google Test's multi-threading constructs.
2488 // To use it, write:
2489 //
2490 // void ThreadFunc(int param) { /* Do things with param */ }
2491 // Notification thread_can_start;
2492 // ...
2493 // // The thread_can_start parameter is optional; you can supply NULL.
2494 // ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);
2495 // thread_can_start.Notify();
2496 //
2497 // These classes are only for testing Google Test's own constructs. Do
2498 // not use them in user tests, either directly or indirectly.
2499 template <typename T>
2500 class ThreadWithParam : public ThreadWithParamBase
2501 {
2502 public:
2503  typedef void (*UserThreadFunc)(T);
2504 
2505  ThreadWithParam(
2506  UserThreadFunc func, T param, Notification * thread_can_start)
2507  : func_(func),
2508  param_(param),
2509  thread_can_start_(thread_can_start),
2510  finished_(false)
2511  {
2512  ThreadWithParamBase * const base = this;
2513  // The thread can be created only after all fields except thread_
2514  // have been initialized.
2516  pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base));
2517  }
2518  ~ThreadWithParam() { Join(); }
2519 
2520  void Join()
2521  {
2522  if (!finished_)
2523  {
2524  GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, 0));
2525  finished_ = true;
2526  }
2527  }
2528 
2529  virtual void Run()
2530  {
2531  if (thread_can_start_ != NULL)
2532  { thread_can_start_->WaitForNotification(); }
2533 
2534  func_(param_);
2535  }
2536 
2537 private:
2538  const UserThreadFunc func_; // User-supplied thread function.
2539  const T param_; // User-supplied parameter to the thread function.
2540  // When non-NULL, used to block execution until the controller thread
2541  // notifies.
2542  Notification * const thread_can_start_;
2543  bool finished_; // true iff we know that the thread function has finished.
2544  pthread_t thread_; // The native thread object.
2545 
2546  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);
2547 };
2548 
2549 // MutexBase and Mutex implement mutex on pthreads-based platforms. They
2550 // are used in conjunction with class MutexLock:
2551 //
2552 // Mutex mutex;
2553 // ...
2554 // MutexLock lock(&mutex); // Acquires the mutex and releases it at the end
2555 // // of the current scope.
2556 //
2557 // MutexBase implements behavior for both statically and dynamically
2558 // allocated mutexes. Do not use MutexBase directly. Instead, write
2559 // the following to define a static mutex:
2560 //
2561 // GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex);
2562 //
2563 // You can forward declare a static mutex like this:
2564 //
2565 // GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex);
2566 //
2567 // To create a dynamic mutex, just define an object of type Mutex.
2568 class MutexBase
2569 {
2570 public:
2571  // Acquires this mutex.
2572  void Lock()
2573  {
2574  GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
2575  owner_ = pthread_self();
2576  has_owner_ = true;
2577  }
2578 
2579  // Releases this mutex.
2580  void Unlock()
2581  {
2582  // Since the lock is being released the owner_ field should no longer be
2583  // considered valid. We don't protect writing to has_owner_ here, as it's
2584  // the caller's responsibility to ensure that the current thread holds the
2585  // mutex when this is called.
2586  has_owner_ = false;
2587  GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
2588  }
2589 
2590  // Does nothing if the current thread holds the mutex. Otherwise, crashes
2591  // with high probability.
2592  void AssertHeld() const
2593  {
2594  GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))
2595  << "The current thread is not holding the mutex @" << this;
2596  }
2597 
2598  // A static mutex may be used before main() is entered. It may even
2599  // be used before the dynamic initialization stage. Therefore we
2600  // must be able to initialize a static mutex object at link time.
2601  // This means MutexBase has to be a POD and its member variables
2602  // have to be public.
2603 public:
2604  pthread_mutex_t mutex_; // The underlying pthread mutex.
2605  // has_owner_ indicates whether the owner_ field below contains a valid thread
2606  // ID and is therefore safe to inspect (e.g., to use in pthread_equal()). All
2607  // accesses to the owner_ field should be protected by a check of this field.
2608  // An alternative might be to memset() owner_ to all zeros, but there's no
2609  // guarantee that a zero'd pthread_t is necessarily invalid or even different
2610  // from pthread_self().
2611  bool has_owner_;
2612  pthread_t owner_; // The thread holding the mutex.
2613 };
2614 
2615 // Forward-declares a static mutex.
2616 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
2617  extern ::testing::internal::MutexBase mutex
2618 
2619 // Defines and statically (i.e. at link time) initializes a static mutex.
2620 // The initialization list here does not explicitly initialize each field,
2621 // instead relying on default initialization for the unspecified fields. In
2622 // particular, the owner_ field (a pthread_t) is not explicitly initialized.
2623 // This allows initialization to work whether pthread_t is a scalar or struct.
2624 // The flag -Wmissing-field-initializers must not be specified for this to work.
2625 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
2626  ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }
2627 
2628 // The Mutex class can only be used for mutexes created at runtime. It
2629 // shares its API with MutexBase otherwise.
2630 class Mutex : public MutexBase
2631 {
2632 public:
2633  Mutex()
2634  {
2635  GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
2636  has_owner_ = false;
2637  }
2638  ~Mutex()
2639  {
2640  GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_));
2641  }
2642 
2643 private:
2645 };
2646 
2647 // We cannot name this class MutexLock as the ctor declaration would
2648 // conflict with a macro named MutexLock, which is defined on some
2649 // platforms. Hence the typedef trick below.
2650 class GTestMutexLock
2651 {
2652 public:
2653  explicit GTestMutexLock(MutexBase * mutex)
2654  : mutex_(mutex) { mutex_->Lock(); }
2655 
2656  ~GTestMutexLock() { mutex_->Unlock(); }
2657 
2658 private:
2659  MutexBase * const mutex_;
2660 
2661  GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);
2662 };
2663 
2664 typedef GTestMutexLock MutexLock;
2665 
2666 // Helpers for ThreadLocal.
2667 
2668 // pthread_key_create() requires DeleteThreadLocalValue() to have
2669 // C-linkage. Therefore it cannot be templatized to access
2670 // ThreadLocal<T>. Hence the need for class
2671 // ThreadLocalValueHolderBase.
2672 class ThreadLocalValueHolderBase
2673 {
2674 public:
2675  virtual ~ThreadLocalValueHolderBase() {}
2676 };
2677 
2678 // Called by pthread to delete thread-local data stored by
2679 // pthread_setspecific().
2680 extern "C" inline void DeleteThreadLocalValue(void * value_holder)
2681 {
2682  delete static_cast<ThreadLocalValueHolderBase *>(value_holder);
2683 }
2684 
2685 // Implements thread-local storage on pthreads-based systems.
2686 //
2687 // // Thread 1
2688 // ThreadLocal<int> tl(100); // 100 is the default value for each thread.
2689 //
2690 // // Thread 2
2691 // tl.set(150); // Changes the value for thread 2 only.
2692 // EXPECT_EQ(150, tl.get());
2693 //
2694 // // Thread 1
2695 // EXPECT_EQ(100, tl.get()); // In thread 1, tl has the original value.
2696 // tl.set(200);
2697 // EXPECT_EQ(200, tl.get());
2698 //
2699 // The template type argument T must have a public copy constructor.
2700 // In addition, the default ThreadLocal constructor requires T to have
2701 // a public default constructor.
2702 //
2703 // An object managed for a thread by a ThreadLocal instance is deleted
2704 // when the thread exits. Or, if the ThreadLocal instance dies in
2705 // that thread, when the ThreadLocal dies. It's the user's
2706 // responsibility to ensure that all other threads using a ThreadLocal
2707 // have exited when it dies, or the per-thread objects for those
2708 // threads will not be deleted.
2709 //
2710 // Google Test only uses global ThreadLocal objects. That means they
2711 // will die after main() has returned. Therefore, no per-thread
2712 // object managed by Google Test will be leaked as long as all threads
2713 // using Google Test have exited when main() returns.
2714 template <typename T>
2715 class ThreadLocal
2716 {
2717 public:
2718  ThreadLocal() : key_(CreateKey()),
2719  default_() {}
2720  explicit ThreadLocal(const T & value) : key_(CreateKey()),
2721  default_(value) {}
2722 
2723  ~ThreadLocal()
2724  {
2725  // Destroys the managed object for the current thread, if any.
2726  DeleteThreadLocalValue(pthread_getspecific(key_));
2727 
2728  // Releases resources associated with the key. This will *not*
2729  // delete managed objects for other threads.
2730  GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));
2731  }
2732 
2733  T * pointer() { return GetOrCreateValue(); }
2734  const T * pointer() const { return GetOrCreateValue(); }
2735  const T & get() const { return *pointer(); }
2736  void set(const T & value) { *pointer() = value; }
2737 
2738 private:
2739  // Holds a value of type T.
2740  class ValueHolder : public ThreadLocalValueHolderBase
2741  {
2742  public:
2743  explicit ValueHolder(const T & value) : value_(value) {}
2744 
2745  T * pointer() { return &value_; }
2746 
2747  private:
2748  T value_;
2749  GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);
2750  };
2751 
2752  static pthread_key_t CreateKey()
2753  {
2754  pthread_key_t key;
2755  // When a thread exits, DeleteThreadLocalValue() will be called on
2756  // the object managed for that thread.
2758  pthread_key_create(&key, &DeleteThreadLocalValue));
2759  return key;
2760  }
2761 
2762  T * GetOrCreateValue() const
2763  {
2764  ThreadLocalValueHolderBase * const holder =
2765  static_cast<ThreadLocalValueHolderBase *>(pthread_getspecific(key_));
2766 
2767  if (holder != NULL)
2768  {
2769  return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
2770  }
2771 
2772  ValueHolder * const new_holder = new ValueHolder(default_);
2773  ThreadLocalValueHolderBase * const holder_base = new_holder;
2774  GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));
2775  return new_holder->pointer();
2776  }
2777 
2778  // A key pthreads uses for looking up per-thread values.
2779  const pthread_key_t key_;
2780  const T default_; // The default value for each thread.
2781 
2782  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);
2783 };
2784 
2785 # define GTEST_IS_THREADSAFE 1
2786 
2787 #else // GTEST_HAS_PTHREAD
2788 
2789 // A dummy implementation of synchronization primitives (mutex, lock,
2790 // and thread-local variable). Necessary for compiling Google Test where
2791 // mutex is not supported - using Google Test in multiple threads is not
2792 // supported on such platforms.
2793 
2794 class Mutex
2795 {
2796 public:
2797  Mutex() {}
2798  void Lock() {}
2799  void Unlock() {}
2800  void AssertHeld() const {}
2801 };
2802 
2803 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
2804  extern ::testing::internal::Mutex mutex
2805 
2806 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex
2807 
2808 class GTestMutexLock
2809 {
2810 public:
2811  explicit GTestMutexLock(Mutex *) {} // NOLINT
2812 };
2813 
2814 typedef GTestMutexLock MutexLock;
2815 
2816 template <typename T>
2817 class ThreadLocal
2818 {
2819 public:
2820  ThreadLocal() : value_() {}
2821  explicit ThreadLocal(const T & value) : value_(value) {}
2822  T * pointer() { return &value_; }
2823  const T * pointer() const { return &value_; }
2824  const T & get() const { return value_; }
2825  void set(const T & value) { value_ = value; }
2826 private:
2827  T value_;
2828 };
2829 
2830 // The above synchronization primitives have dummy implementations.
2831 // Therefore Google Test is not thread-safe.
2832 # define GTEST_IS_THREADSAFE 0
2833 
2834 #endif // GTEST_HAS_PTHREAD
2835 
2836 // Returns the number of threads running in the process, or 0 to indicate that
2837 // we cannot detect it.
2838 GTEST_API_ size_t GetThreadCount();
2839 
2840 // Passing non-POD classes through ellipsis (...) crashes the ARM
2841 // compiler and generates a warning in Sun Studio. The Nokia Symbian
2842 // and the IBM XL C/C++ compiler try to instantiate a copy constructor
2843 // for objects passed through ellipsis (...), failing for uncopyable
2844 // objects. We define this to ensure that only POD is passed through
2845 // ellipsis on these systems.
2846 #if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
2847 // We lose support for NULL detection where the compiler doesn't like
2848 // passing non-POD classes through ellipsis (...).
2849 # define GTEST_ELLIPSIS_NEEDS_POD_ 1
2850 #else
2851 # define GTEST_CAN_COMPARE_NULL 1
2852 #endif
2853 
2854 // The Nokia Symbian and IBM XL C/C++ compilers cannot decide between
2855 // const T& and const T* in a function template. These compilers
2856 // _can_ decide between class template specializations for T and T*,
2857 // so a tr1::type_traits-like is_pointer works.
2858 #if defined(__SYMBIAN32__) || defined(__IBMCPP__)
2859 # define GTEST_NEEDS_IS_POINTER_ 1
2860 #endif
2861 
2862 template <bool bool_value>
2863 struct bool_constant
2864 {
2866  static const bool value = bool_value;
2867 };
2868 template <bool bool_value> const bool bool_constant<bool_value>::value;
2869 
2872 
2873 template <typename T>
2874 struct is_pointer : public false_type {};
2875 
2876 template <typename T>
2877 struct is_pointer<T *> : public true_type {};
2878 
2879 template <typename Iterator>
2880 struct IteratorTraits
2881 {
2882  typedef typename Iterator::value_type value_type;
2883 };
2884 
2885 template <typename T>
2886 struct IteratorTraits<T *>
2887 {
2888  typedef T value_type;
2889 };
2890 
2891 template <typename T>
2892 struct IteratorTraits<const T *>
2893 {
2894  typedef T value_type;
2895 };
2896 
2897 #if GTEST_OS_WINDOWS
2898 # define GTEST_PATH_SEP_ "\\"
2899 # define GTEST_HAS_ALT_PATH_SEP_ 1
2900 // The biggest signed integer type the compiler supports.
2901 typedef __int64 BiggestInt;
2902 #else
2903 # define GTEST_PATH_SEP_ "/"
2904 # define GTEST_HAS_ALT_PATH_SEP_ 0
2905 typedef long long BiggestInt; // NOLINT
2906 #endif // GTEST_OS_WINDOWS
2907 
2908 // Utilities for char.
2909 
2910 // isspace(int ch) and friends accept an unsigned char or EOF. char
2911 // may be signed, depending on the compiler (or compiler flags).
2912 // Therefore we need to cast a char to unsigned char before calling
2913 // isspace(), etc.
2914 
2915 inline bool IsAlpha(char ch)
2916 {
2917  return isalpha(static_cast<unsigned char>(ch)) != 0;
2918 }
2919 inline bool IsAlNum(char ch)
2920 {
2921  return isalnum(static_cast<unsigned char>(ch)) != 0;
2922 }
2923 inline bool IsDigit(char ch)
2924 {
2925  return isdigit(static_cast<unsigned char>(ch)) != 0;
2926 }
2927 inline bool IsLower(char ch)
2928 {
2929  return islower(static_cast<unsigned char>(ch)) != 0;
2930 }
2931 inline bool IsSpace(char ch)
2932 {
2933  return isspace(static_cast<unsigned char>(ch)) != 0;
2934 }
2935 inline bool IsUpper(char ch)
2936 {
2937  return isupper(static_cast<unsigned char>(ch)) != 0;
2938 }
2939 inline bool IsXDigit(char ch)
2940 {
2941  return isxdigit(static_cast<unsigned char>(ch)) != 0;
2942 }
2943 inline bool IsXDigit(wchar_t ch)
2944 {
2945  const unsigned char low_byte = static_cast<unsigned char>(ch);
2946  return ch == low_byte && isxdigit(low_byte) != 0;
2947 }
2948 
2949 inline char ToLower(char ch)
2950 {
2951  return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
2952 }
2953 inline char ToUpper(char ch)
2954 {
2955  return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
2956 }
2957 
2958 // The testing::internal::posix namespace holds wrappers for common
2959 // POSIX functions. These wrappers hide the differences between
2960 // Windows/MSVC and POSIX systems. Since some compilers define these
2961 // standard functions as macros, the wrapper cannot have the same name
2962 // as the wrapped function.
2963 
2964 namespace posix
2965 {
2966 
2967 // Functions with a different name on Windows.
2968 
2969 #if GTEST_OS_WINDOWS
2970 
2971 typedef struct _stat StatStruct;
2972 
2973 # ifdef __BORLANDC__
2974 inline int IsATTY(int fd) { return isatty(fd); }
2975 inline int StrCaseCmp(const char * s1, const char * s2)
2976 {
2977  return stricmp(s1, s2);
2978 }
2979 inline char * StrDup(const char * src) { return strdup(src); }
2980 # else // !__BORLANDC__
2981 # if GTEST_OS_WINDOWS_MOBILE
2982 inline int IsATTY(int /* fd */) { return 0; }
2983 # else
2984 inline int IsATTY(int fd) { return _isatty(fd); }
2985 # endif // GTEST_OS_WINDOWS_MOBILE
2986 inline int StrCaseCmp(const char * s1, const char * s2)
2987 {
2988  return _stricmp(s1, s2);
2989 }
2990 inline char * StrDup(const char * src) { return _strdup(src); }
2991 # endif // __BORLANDC__
2992 
2993 # if GTEST_OS_WINDOWS_MOBILE
2994 inline int FileNo(FILE * file) { return reinterpret_cast<int>(_fileno(file)); }
2995 // Stat(), RmDir(), and IsDir() are not needed on Windows CE at this
2996 // time and thus not defined there.
2997 # else
2998 inline int FileNo(FILE * file) { return _fileno(file); }
2999 inline int Stat(const char * path, StatStruct * buf) { return _stat(path, buf); }
3000 inline int RmDir(const char * dir) { return _rmdir(dir); }
3001 inline bool IsDir(const StatStruct & st)
3002 {
3003  return (_S_IFDIR & st.st_mode) != 0;
3004 }
3005 # endif // GTEST_OS_WINDOWS_MOBILE
3006 
3007 #else
3008 
3009 typedef struct stat StatStruct;
3010 
3011 inline int FileNo(FILE * file) { return fileno(file); }
3012 inline int IsATTY(int fd) { return isatty(fd); }
3013 inline int Stat(const char * path, StatStruct * buf) { return stat(path, buf); }
3014 inline int StrCaseCmp(const char * s1, const char * s2)
3015 {
3016  return strcasecmp(s1, s2);
3017 }
3018 inline char * StrDup(const char * src) { return strdup(src); }
3019 inline int RmDir(const char * dir) { return rmdir(dir); }
3020 inline bool IsDir(const StatStruct & st) { return S_ISDIR(st.st_mode); }
3021 
3022 #endif // GTEST_OS_WINDOWS
3023 
3024 // Functions deprecated by MSVC 8.0.
3025 
3026 #ifdef _MSC_VER
3027 // Temporarily disable warning 4996 (deprecated function).
3028 # pragma warning(push)
3029 # pragma warning(disable:4996)
3030 #endif
3031 
3032 inline const char * StrNCpy(char * dest, const char * src, size_t n)
3033 {
3034  return strncpy(dest, src, n);
3035 }
3036 
3037 // ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and
3038 // StrError() aren't needed on Windows CE at this time and thus not
3039 // defined there.
3040 
3041 #if !GTEST_OS_WINDOWS_MOBILE
3042 inline int ChDir(const char * dir) { return chdir(dir); }
3043 #endif
3044 inline FILE * FOpen(const char * path, const char * mode)
3045 {
3046  return fopen(path, mode);
3047 }
3048 #if !GTEST_OS_WINDOWS_MOBILE
3049 inline FILE * FReopen(const char * path, const char * mode, FILE * stream)
3050 {
3051  return freopen(path, mode, stream);
3052 }
3053 inline FILE * FDOpen(int fd, const char * mode) { return fdopen(fd, mode); }
3054 #endif
3055 inline int FClose(FILE * fp) { return fclose(fp); }
3056 #if !GTEST_OS_WINDOWS_MOBILE
3057 inline int Read(int fd, void * buf, unsigned int count)
3058 {
3059  return static_cast<int>(read(fd, buf, count));
3060 }
3061 inline int Write(int fd, const void * buf, unsigned int count)
3062 {
3063  return static_cast<int>(write(fd, buf, count));
3064 }
3065 inline int Close(int fd) { return close(fd); }
3066 inline const char * StrError(int errnum) { return strerror(errnum); }
3067 #endif
3068 inline const char * GetEnv(const char * name)
3069 {
3070 #if GTEST_OS_WINDOWS_MOBILE
3071  // We are on Windows CE, which has no environment variables.
3072  return NULL;
3073 #elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
3074  // Environment variables which we programmatically clear will be set to the
3075  // empty string rather than unset (NULL). Handle that case.
3076  const char * const env = getenv(name);
3077  return (env != NULL && env[0] != '\0') ? env : NULL;
3078 #else
3079  return getenv(name);
3080 #endif
3081 }
3082 
3083 #ifdef _MSC_VER
3084 # pragma warning(pop) // Restores the warning state.
3085 #endif
3086 
3087 #if GTEST_OS_WINDOWS_MOBILE
3088 // Windows CE has no C library. The abort() function is used in
3089 // several places in Google Test. This implementation provides a reasonable
3090 // imitation of standard behaviour.
3091 void Abort();
3092 #else
3093 inline void Abort() { abort(); }
3094 #endif // GTEST_OS_WINDOWS_MOBILE
3095 
3096 } // namespace posix
3097 
3098 // MSVC "deprecates" snprintf and issues warnings wherever it is used. In
3099 // order to avoid these warnings, we need to use _snprintf or _snprintf_s on
3100 // MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate
3101 // function in order to achieve that. We use macro definition here because
3102 // snprintf is a variadic function.
3103 #if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE
3104 // MSVC 2005 and above support variadic macros.
3105 # define GTEST_SNPRINTF_(buffer, size, format, ...) \
3106  _snprintf_s(buffer, size, size, format, __VA_ARGS__)
3107 #elif defined(_MSC_VER)
3108 // Windows CE does not define _snprintf_s and MSVC prior to 2005 doesn't
3109 // complain about _snprintf.
3110 # define GTEST_SNPRINTF_ _snprintf
3111 #else
3112 # define GTEST_SNPRINTF_ snprintf
3113 #endif
3114 
3115 // The maximum number a BiggestInt can represent. This definition
3116 // works no matter BiggestInt is represented in one's complement or
3117 // two's complement.
3118 //
3119 // We cannot rely on numeric_limits in STL, as __int64 and long long
3120 // are not part of standard C++ and numeric_limits doesn't need to be
3121 // defined for them.
3122 const BiggestInt kMaxBiggestInt =
3123  ~(static_cast<BiggestInt>(1) << (8 * sizeof(BiggestInt) - 1));
3124 
3125 // This template class serves as a compile-time function from size to
3126 // type. It maps a size in bytes to a primitive type with that
3127 // size. e.g.
3128 //
3129 // TypeWithSize<4>::UInt
3130 //
3131 // is typedef-ed to be unsigned int (unsigned integer made up of 4
3132 // bytes).
3133 //
3134 // Such functionality should belong to STL, but I cannot find it
3135 // there.
3136 //
3137 // Google Test uses this class in the implementation of floating-point
3138 // comparison.
3139 //
3140 // For now it only handles UInt (unsigned int) as that's all Google Test
3141 // needs. Other types can be easily added in the future if need
3142 // arises.
3143 template <size_t size>
3144 class TypeWithSize
3145 {
3146 public:
3147  // This prevents the user from using TypeWithSize<N> with incorrect
3148  // values of N.
3149  typedef void UInt;
3150 };
3151 
3152 // The specialization for size 4.
3153 template <>
3154 class TypeWithSize<4>
3155 {
3156 public:
3157  // unsigned int has size 4 in both gcc and MSVC.
3158  //
3159  // As base/basictypes.h doesn't compile on Windows, we cannot use
3160  // uint32, uint64, and etc here.
3161  typedef int Int;
3162  typedef unsigned int UInt;
3163 };
3164 
3165 // The specialization for size 8.
3166 template <>
3167 class TypeWithSize<8>
3168 {
3169 public:
3170 #if GTEST_OS_WINDOWS
3171  typedef __int64 Int;
3172  typedef unsigned __int64 UInt;
3173 #else
3174  typedef long long Int; // NOLINT
3175  typedef unsigned long long UInt; // NOLINT
3176 #endif // GTEST_OS_WINDOWS
3177 };
3178 
3179 // Integer types of known sizes.
3180 typedef TypeWithSize<4>::Int Int32;
3182 typedef TypeWithSize<8>::Int Int64;
3184 typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
3185 
3186 // Utilities for command line flags and environment variables.
3187 
3188 // Macro for referencing flags.
3189 #define GTEST_FLAG(name) FLAGS_gtest_##name
3190 
3191 // Macros for declaring flags.
3192 #define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)
3193 #define GTEST_DECLARE_int32_(name) \
3194  GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)
3195 #define GTEST_DECLARE_string_(name) \
3196  GTEST_API_ extern ::std::string GTEST_FLAG(name)
3197 
3198 // Macros for defining flags.
3199 #define GTEST_DEFINE_bool_(name, default_val, doc) \
3200  GTEST_API_ bool GTEST_FLAG(name) = (default_val)
3201 #define GTEST_DEFINE_int32_(name, default_val, doc) \
3202  GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)
3203 #define GTEST_DEFINE_string_(name, default_val, doc) \
3204  GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)
3205 
3206 // Thread annotations
3207 #define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
3208 #define GTEST_LOCK_EXCLUDED_(locks)
3209 
3210 // Parses 'str' for a 32-bit signed integer. If successful, writes the result
3211 // to *value and returns true; otherwise leaves *value unchanged and returns
3212 // false.
3213 // TODO(chandlerc): Find a better way to refactor flag and environment parsing
3214 // out of both gtest-port.cc and gtest.cc to avoid exporting this utility
3215 // function.
3216 bool ParseInt32(const Message & src_text, const char * str, Int32 * value);
3217 
3218 // Parses a bool/Int32/string from the environment variable
3219 // corresponding to the given Google Test flag.
3220 bool BoolFromGTestEnv(const char * flag, bool default_val);
3221 GTEST_API_ Int32 Int32FromGTestEnv(const char * flag, Int32 default_val);
3222 const char * StringFromGTestEnv(const char * flag, const char * default_val);
3223 
3224 } // namespace internal
3225 } // namespace testing
3226 
3227 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
3228 
3229 #if GTEST_OS_LINUX
3230 # include <stdlib.h>
3231 # include <sys/types.h>
3232 # include <sys/wait.h>
3233 # include <unistd.h>
3234 #endif // GTEST_OS_LINUX
3235 
3236 #if GTEST_HAS_EXCEPTIONS
3237 # include <stdexcept>
3238 #endif
3239 
3240 #include <ctype.h>
3241 #include <float.h>
3242 #include <string.h>
3243 #include <iomanip>
3244 #include <limits>
3245 #include <set>
3246 
3247 // Copyright 2005, Google Inc.
3248 // All rights reserved.
3249 //
3250 // Redistribution and use in source and binary forms, with or without
3251 // modification, are permitted provided that the following conditions are
3252 // met:
3253 //
3254 // * Redistributions of source code must retain the above copyright
3255 // notice, this list of conditions and the following disclaimer.
3256 // * Redistributions in binary form must reproduce the above
3257 // copyright notice, this list of conditions and the following disclaimer
3258 // in the documentation and/or other materials provided with the
3259 // distribution.
3260 // * Neither the name of Google Inc. nor the names of its
3261 // contributors may be used to endorse or promote products derived from
3262 // this software without specific prior written permission.
3263 //
3264 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3265 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3266 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3267 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3268 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3269 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3270 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3271 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3272 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3273 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3274 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3275 //
3276 // Author: wan@google.com (Zhanyong Wan)
3277 //
3278 // The Google C++ Testing Framework (Google Test)
3279 //
3280 // This header file defines the Message class.
3281 //
3282 // IMPORTANT NOTE: Due to limitation of the C++ language, we have to
3283 // leave some internal implementation details in this header file.
3284 // They are clearly marked by comments like this:
3285 //
3286 // // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
3287 //
3288 // Such code is NOT meant to be used by a user directly, and is subject
3289 // to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
3290 // program!
3291 
3292 #ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
3293 #define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
3294 
3295 #include <limits>
3296 
3297 
3298 // Ensures that there is at least one operator<< in the global namespace.
3299 // See Message& operator<<(...) below for why.
3300 void operator<<(const testing::internal::Secret &, int);
3301 
3302 namespace testing
3303 {
3304 
3305 // The Message class works like an ostream repeater.
3306 //
3307 // Typical usage:
3308 //
3309 // 1. You stream a bunch of values to a Message object.
3310 // It will remember the text in a stringstream.
3311 // 2. Then you stream the Message object to an ostream.
3312 // This causes the text in the Message to be streamed
3313 // to the ostream.
3314 //
3315 // For example;
3316 //
3317 // testing::Message foo;
3318 // foo << 1 << " != " << 2;
3319 // std::cout << foo;
3320 //
3321 // will print "1 != 2".
3322 //
3323 // Message is not intended to be inherited from. In particular, its
3324 // destructor is not virtual.
3325 //
3326 // Note that stringstream behaves differently in gcc and in MSVC. You
3327 // can stream a NULL char pointer to it in the former, but not in the
3328 // latter (it causes an access violation if you do). The Message
3329 // class hides this difference by treating a NULL char pointer as
3330 // "(null)".
3331 class GTEST_API_ Message
3332 {
3333 private:
3334  // The type of basic IO manipulators (endl, ends, and flush) for
3335  // narrow streams.
3336  typedef std::ostream & (*BasicNarrowIoManip)(std::ostream &);
3337 
3338 public:
3339  // Constructs an empty Message.
3340  Message();
3341 
3342  // Copy constructor.
3343  Message(const Message & msg) : ss_(new ::std::stringstream) // NOLINT
3344  {
3345  *ss_ << msg.GetString();
3346  }
3347 
3348  // Constructs a Message from a C-string.
3349  explicit Message(const char * str) : ss_(new ::std::stringstream)
3350  {
3351  *ss_ << str;
3352  }
3353 
3354 #if GTEST_OS_SYMBIAN
3355  // Streams a value (either a pointer or not) to this object.
3356  template <typename T>
3357  inline Message & operator <<(const T & value)
3358  {
3359  StreamHelper(typename internal::is_pointer<T>::type(), value);
3360  return *this;
3361  }
3362 #else
3363  // Streams a non-pointer value to this object.
3364  template <typename T>
3365  inline Message & operator <<(const T & val)
3366  {
3367  // Some libraries overload << for STL containers. These
3368  // overloads are defined in the global namespace instead of ::std.
3369  //
3370  // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
3371  // overloads are visible in either the std namespace or the global
3372  // namespace, but not other namespaces, including the testing
3373  // namespace which Google Test's Message class is in.
3374  //
3375  // To allow STL containers (and other types that has a << operator
3376  // defined in the global namespace) to be used in Google Test
3377  // assertions, testing::Message must access the custom << operator
3378  // from the global namespace. With this using declaration,
3379  // overloads of << defined in the global namespace and those
3380  // visible via Koenig lookup are both exposed in this function.
3381  using ::operator <<;
3382  *ss_ << val;
3383  return *this;
3384  }
3385 
3386  // Streams a pointer value to this object.
3387  //
3388  // This function is an overload of the previous one. When you
3389  // stream a pointer to a Message, this definition will be used as it
3390  // is more specialized. (The C++ Standard, section
3391  // [temp.func.order].) If you stream a non-pointer, then the
3392  // previous definition will be used.
3393  //
3394  // The reason for this overload is that streaming a NULL pointer to
3395  // ostream is undefined behavior. Depending on the compiler, you
3396  // may get "0", "(nil)", "(null)", or an access violation. To
3397  // ensure consistent result across compilers, we always treat NULL
3398  // as "(null)".
3399  template <typename T>
3400  inline Message & operator <<(T * const & pointer) // NOLINT
3401  {
3402  if (pointer == NULL)
3403  {
3404  *ss_ << "(null)";
3405  }
3406 
3407  else
3408  {
3409  *ss_ << pointer;
3410  }
3411 
3412  return *this;
3413  }
3414 #endif // GTEST_OS_SYMBIAN
3415 
3416  // Since the basic IO manipulators are overloaded for both narrow
3417  // and wide streams, we have to provide this specialized definition
3418  // of operator <<, even though its body is the same as the
3419  // templatized version above. Without this definition, streaming
3420  // endl or other basic IO manipulators to Message will confuse the
3421  // compiler.
3422  Message & operator <<(BasicNarrowIoManip val)
3423  {
3424  *ss_ << val;
3425  return *this;
3426  }
3427 
3428  // Instead of 1/0, we want to see true/false for bool values.
3430  {
3431  return *this << (b ? "true" : "false");
3432  }
3433 
3434  // These two overloads allow streaming a wide C string to a Message
3435  // using the UTF-8 encoding.
3436  Message & operator <<(const wchar_t * wide_c_str);
3437  Message & operator <<(wchar_t * wide_c_str);
3438 
3439 #if GTEST_HAS_STD_WSTRING
3440  // Converts the given wide string to a narrow string using the UTF-8
3441  // encoding, and streams the result to this Message object.
3443 #endif // GTEST_HAS_STD_WSTRING
3444 
3445 #if GTEST_HAS_GLOBAL_WSTRING
3446  // Converts the given wide string to a narrow string using the UTF-8
3447  // encoding, and streams the result to this Message object.
3449 #endif // GTEST_HAS_GLOBAL_WSTRING
3450 
3451  // Gets the text streamed to this object so far as an std::string.
3452  // Each '\0' character in the buffer is replaced with "\\0".
3453  //
3454  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
3455  std::string GetString() const;
3456 
3457 private:
3458 
3459 #if GTEST_OS_SYMBIAN
3460  // These are needed as the Nokia Symbian Compiler cannot decide between
3461  // const T& and const T* in a function template. The Nokia compiler _can_
3462  // decide between class template specializations for T and T*, so a
3463  // tr1::type_traits-like is_pointer works, and we can overload on that.
3464  template <typename T>
3465  inline void StreamHelper(internal::true_type /*is_pointer*/, T * pointer)
3466  {
3467  if (pointer == NULL)
3468  {
3469  *ss_ << "(null)";
3470  }
3471 
3472  else
3473  {
3474  *ss_ << pointer;
3475  }
3476  }
3477  template <typename T>
3478  inline void StreamHelper(internal::false_type /*is_pointer*/,
3479  const T & value)
3480  {
3481  // See the comments in Message& operator <<(const T&) above for why
3482  // we need this using statement.
3483  using ::operator <<;
3484  *ss_ << value;
3485  }
3486 #endif // GTEST_OS_SYMBIAN
3487 
3488  // We'll hold the text streamed to this object here.
3490 
3491  // We declare (but don't implement) this to prevent the compiler
3492  // from implementing the assignment operator.
3493  void operator=(const Message &);
3494 };
3495 
3496 // Streams a Message to an ostream.
3497 inline std::ostream & operator <<(std::ostream & os, const Message & sb)
3498 {
3499  return os << sb.GetString();
3500 }
3501 
3502 namespace internal
3503 {
3504 
3505 // Converts a streamable value to an std::string. A NULL pointer is
3506 // converted to "(null)". When the input value is a ::string,
3507 // ::std::string, ::wstring, or ::std::wstring object, each NUL
3508 // character in it is replaced with "\\0".
3509 template <typename T>
3510 std::string StreamableToString(const T & streamable)
3511 {
3512  return (Message() << streamable).GetString();
3513 }
3514 
3515 } // namespace internal
3516 } // namespace testing
3517 
3518 #endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
3519 // Copyright 2005, Google Inc.
3520 // All rights reserved.
3521 //
3522 // Redistribution and use in source and binary forms, with or without
3523 // modification, are permitted provided that the following conditions are
3524 // met:
3525 //
3526 // * Redistributions of source code must retain the above copyright
3527 // notice, this list of conditions and the following disclaimer.
3528 // * Redistributions in binary form must reproduce the above
3529 // copyright notice, this list of conditions and the following disclaimer
3530 // in the documentation and/or other materials provided with the
3531 // distribution.
3532 // * Neither the name of Google Inc. nor the names of its
3533 // contributors may be used to endorse or promote products derived from
3534 // this software without specific prior written permission.
3535 //
3536 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3537 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3538 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3539 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3540 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3541 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3542 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3543 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3544 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3545 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3546 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3547 //
3548 // Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
3549 //
3550 // The Google C++ Testing Framework (Google Test)
3551 //
3552 // This header file declares the String class and functions used internally by
3553 // Google Test. They are subject to change without notice. They should not used
3554 // by code external to Google Test.
3555 //
3556 // This header file is #included by <gtest/internal/gtest-internal.h>.
3557 // It should not be #included by other files.
3558 
3559 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
3560 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
3561 
3562 #ifdef __BORLANDC__
3563 // string.h is not guaranteed to provide strcpy on C++ Builder.
3564 # include <mem.h>
3565 #endif
3566 
3567 #include <string.h>
3568 #include <string>
3569 
3570 
3571 namespace testing
3572 {
3573 namespace internal
3574 {
3575 
3576 // String - an abstract class holding static string utilities.
3577 class GTEST_API_ String
3578 {
3579 public:
3580  // Static utility methods
3581 
3582  // Clones a 0-terminated C string, allocating memory using new. The
3583  // caller is responsible for deleting the return value using
3584  // delete[]. Returns the cloned string, or NULL if the input is
3585  // NULL.
3586  //
3587  // This is different from strdup() in string.h, which allocates
3588  // memory using malloc().
3589  static const char * CloneCString(const char * c_str);
3590 
3591 #if GTEST_OS_WINDOWS_MOBILE
3592  // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be
3593  // able to pass strings to Win32 APIs on CE we need to convert them
3594  // to 'Unicode', UTF-16.
3595 
3596  // Creates a UTF-16 wide string from the given ANSI string, allocating
3597  // memory using new. The caller is responsible for deleting the return
3598  // value using delete[]. Returns the wide string, or NULL if the
3599  // input is NULL.
3600  //
3601  // The wide string is created using the ANSI codepage (CP_ACP) to
3602  // match the behaviour of the ANSI versions of Win32 calls and the
3603  // C runtime.
3604  static LPCWSTR AnsiToUtf16(const char * c_str);
3605 
3606  // Creates an ANSI string from the given wide string, allocating
3607  // memory using new. The caller is responsible for deleting the return
3608  // value using delete[]. Returns the ANSI string, or NULL if the
3609  // input is NULL.
3610  //
3611  // The returned string is created using the ANSI codepage (CP_ACP) to
3612  // match the behaviour of the ANSI versions of Win32 calls and the
3613  // C runtime.
3614  static const char * Utf16ToAnsi(LPCWSTR utf16_str);
3615 #endif
3616 
3617  // Compares two C strings. Returns true iff they have the same content.
3618  //
3619  // Unlike strcmp(), this function can handle NULL argument(s). A
3620  // NULL C string is considered different to any non-NULL C string,
3621  // including the empty string.
3622  static bool CStringEquals(const char * lhs, const char * rhs);
3623 
3624  // Converts a wide C string to a String using the UTF-8 encoding.
3625  // NULL will be converted to "(null)". If an error occurred during
3626  // the conversion, "(failed to convert from wide string)" is
3627  // returned.
3628  static std::string ShowWideCString(const wchar_t * wide_c_str);
3629 
3630  // Compares two wide C strings. Returns true iff they have the same
3631  // content.
3632  //
3633  // Unlike wcscmp(), this function can handle NULL argument(s). A
3634  // NULL C string is considered different to any non-NULL C string,
3635  // including the empty string.
3636  static bool WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs);
3637 
3638  // Compares two C strings, ignoring case. Returns true iff they
3639  // have the same content.
3640  //
3641  // Unlike strcasecmp(), this function can handle NULL argument(s).
3642  // A NULL C string is considered different to any non-NULL C string,
3643  // including the empty string.
3644  static bool CaseInsensitiveCStringEquals(const char * lhs,
3645  const char * rhs);
3646 
3647  // Compares two wide C strings, ignoring case. Returns true iff they
3648  // have the same content.
3649  //
3650  // Unlike wcscasecmp(), this function can handle NULL argument(s).
3651  // A NULL C string is considered different to any non-NULL wide C string,
3652  // including the empty string.
3653  // NB: The implementations on different platforms slightly differ.
3654  // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
3655  // environment variable. On GNU platform this method uses wcscasecmp
3656  // which compares according to LC_CTYPE category of the current locale.
3657  // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
3658  // current locale.
3659  static bool CaseInsensitiveWideCStringEquals(const wchar_t * lhs,
3660  const wchar_t * rhs);
3661 
3662  // Returns true iff the given string ends with the given suffix, ignoring
3663  // case. Any string is considered to end with an empty suffix.
3664  static bool EndsWithCaseInsensitive(
3665  const std::string & str, const std::string & suffix);
3666 
3667  // Formats an int value as "%02d".
3668  static std::string FormatIntWidth2(int value); // "%02d" for width == 2
3669 
3670  // Formats an int value as "%X".
3671  static std::string FormatHexInt(int value);
3672 
3673  // Formats a byte as "%02X".
3674  static std::string FormatByte(unsigned char value);
3675 
3676 private:
3677  String(); // Not meant to be instantiated.
3678 }; // class String
3679 
3680 // Gets the content of the stringstream's buffer as an std::string. Each '\0'
3681 // character in the buffer is replaced with "\\0".
3682 GTEST_API_ std::string StringStreamToString(::std::stringstream * stream);
3683 
3684 } // namespace internal
3685 } // namespace testing
3686 
3687 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
3688 // Copyright 2008, Google Inc.
3689 // All rights reserved.
3690 //
3691 // Redistribution and use in source and binary forms, with or without
3692 // modification, are permitted provided that the following conditions are
3693 // met:
3694 //
3695 // * Redistributions of source code must retain the above copyright
3696 // notice, this list of conditions and the following disclaimer.
3697 // * Redistributions in binary form must reproduce the above
3698 // copyright notice, this list of conditions and the following disclaimer
3699 // in the documentation and/or other materials provided with the
3700 // distribution.
3701 // * Neither the name of Google Inc. nor the names of its
3702 // contributors may be used to endorse or promote products derived from
3703 // this software without specific prior written permission.
3704 //
3705 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3706 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3707 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3708 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3709 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3710 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3711 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3712 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3713 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3714 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3715 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3716 //
3717 // Author: keith.ray@gmail.com (Keith Ray)
3718 //
3719 // Google Test filepath utilities
3720 //
3721 // This header file declares classes and functions used internally by
3722 // Google Test. They are subject to change without notice.
3723 //
3724 // This file is #included in <gtest/internal/gtest-internal.h>.
3725 // Do not include this header file separately!
3726 
3727 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
3728 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
3729 
3730 
3731 namespace testing
3732 {
3733 namespace internal
3734 {
3735 
3736 // FilePath - a class for file and directory pathname manipulation which
3737 // handles platform-specific conventions (like the pathname separator).
3738 // Used for helper functions for naming files in a directory for xml output.
3739 // Except for Set methods, all methods are const or static, which provides an
3740 // "immutable value object" -- useful for peace of mind.
3741 // A FilePath with a value ending in a path separator ("like/this/") represents
3742 // a directory, otherwise it is assumed to represent a file. In either case,
3743 // it may or may not represent an actual file or directory in the file system.
3744 // Names are NOT checked for syntax correctness -- no checking for illegal
3745 // characters, malformed paths, etc.
3746 
3747 class GTEST_API_ FilePath
3748 {
3749 public:
3750  FilePath() : pathname_("") { }
3751  FilePath(const FilePath & rhs) : pathname_(rhs.pathname_) { }
3752 
3753  explicit FilePath(const std::string & pathname) : pathname_(pathname)
3754  {
3755  Normalize();
3756  }
3757 
3758  FilePath & operator=(const FilePath & rhs)
3759  {
3760  Set(rhs);
3761  return *this;
3762  }
3763 
3764  void Set(const FilePath & rhs)
3765  {
3766  pathname_ = rhs.pathname_;
3767  }
3768 
3769  const std::string & string() const { return pathname_; }
3770  const char * c_str() const { return pathname_.c_str(); }
3771 
3772  // Returns the current working directory, or "" if unsuccessful.
3773  static FilePath GetCurrentDir();
3774 
3775  // Given directory = "dir", base_name = "test", number = 0,
3776  // extension = "xml", returns "dir/test.xml". If number is greater
3777  // than zero (e.g., 12), returns "dir/test_12.xml".
3778  // On Windows platform, uses \ as the separator rather than /.
3779  static FilePath MakeFileName(const FilePath & directory,
3780  const FilePath & base_name,
3781  int number,
3782  const char * extension);
3783 
3784  // Given directory = "dir", relative_path = "test.xml",
3785  // returns "dir/test.xml".
3786  // On Windows, uses \ as the separator rather than /.
3787  static FilePath ConcatPaths(const FilePath & directory,
3788  const FilePath & relative_path);
3789 
3790  // Returns a pathname for a file that does not currently exist. The pathname
3791  // will be directory/base_name.extension or
3792  // directory/base_name_<number>.extension if directory/base_name.extension
3793  // already exists. The number will be incremented until a pathname is found
3794  // that does not already exist.
3795  // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
3796  // There could be a race condition if two or more processes are calling this
3797  // function at the same time -- they could both pick the same filename.
3798  static FilePath GenerateUniqueFileName(const FilePath & directory,
3799  const FilePath & base_name,
3800  const char * extension);
3801 
3802  // Returns true iff the path is "".
3803  bool IsEmpty() const { return pathname_.empty(); }
3804 
3805  // If input name has a trailing separator character, removes it and returns
3806  // the name, otherwise return the name string unmodified.
3807  // On Windows platform, uses \ as the separator, other platforms use /.
3808  FilePath RemoveTrailingPathSeparator() const;
3809 
3810  // Returns a copy of the FilePath with the directory part removed.
3811  // Example: FilePath("path/to/file").RemoveDirectoryName() returns
3812  // FilePath("file"). If there is no directory part ("just_a_file"), it returns
3813  // the FilePath unmodified. If there is no file part ("just_a_dir/") it
3814  // returns an empty FilePath ("").
3815  // On Windows platform, '\' is the path separator, otherwise it is '/'.
3816  FilePath RemoveDirectoryName() const;
3817 
3818  // RemoveFileName returns the directory path with the filename removed.
3819  // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
3820  // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
3821  // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
3822  // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
3823  // On Windows platform, '\' is the path separator, otherwise it is '/'.
3824  FilePath RemoveFileName() const;
3825 
3826  // Returns a copy of the FilePath with the case-insensitive extension removed.
3827  // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
3828  // FilePath("dir/file"). If a case-insensitive extension is not
3829  // found, returns a copy of the original FilePath.
3830  FilePath RemoveExtension(const char * extension) const;
3831 
3832  // Creates directories so that path exists. Returns true if successful or if
3833  // the directories already exist; returns false if unable to create
3834  // directories for any reason. Will also return false if the FilePath does
3835  // not represent a directory (that is, it doesn't end with a path separator).
3836  bool CreateDirectoriesRecursively() const;
3837 
3838  // Create the directory so that path exists. Returns true if successful or
3839  // if the directory already exists; returns false if unable to create the
3840  // directory for any reason, including if the parent directory does not
3841  // exist. Not named "CreateDirectory" because that's a macro on Windows.
3842  bool CreateFolder() const;
3843 
3844  // Returns true if FilePath describes something in the file-system,
3845  // either a file, directory, or whatever, and that something exists.
3846  bool FileOrDirectoryExists() const;
3847 
3848  // Returns true if pathname describes a directory in the file-system
3849  // that exists.
3850  bool DirectoryExists() const;
3851 
3852  // Returns true if FilePath ends with a path separator, which indicates that
3853  // it is intended to represent a directory. Returns false otherwise.
3854  // This does NOT check that a directory (or file) actually exists.
3855  bool IsDirectory() const;
3856 
3857  // Returns true if pathname describes a root directory. (Windows has one
3858  // root directory per disk drive.)
3859  bool IsRootDirectory() const;
3860 
3861  // Returns true if pathname describes an absolute path.
3862  bool IsAbsolutePath() const;
3863 
3864 private:
3865  // Replaces multiple consecutive separators with a single separator.
3866  // For example, "bar///foo" becomes "bar/foo". Does not eliminate other
3867  // redundancies that might be in a pathname involving "." or "..".
3868  //
3869  // A pathname with multiple consecutive separators may occur either through
3870  // user error or as a result of some scripts or APIs that generate a pathname
3871  // with a trailing separator. On other platforms the same API or script
3872  // may NOT generate a pathname with a trailing "/". Then elsewhere that
3873  // pathname may have another "/" and pathname components added to it,
3874  // without checking for the separator already being there.
3875  // The script language and operating system may allow paths like "foo//bar"
3876  // but some of the functions in FilePath will not handle that correctly. In
3877  // particular, RemoveTrailingPathSeparator() only removes one separator, and
3878  // it is called in CreateDirectoriesRecursively() assuming that it will change
3879  // a pathname from directory syntax (trailing separator) to filename syntax.
3880  //
3881  // On Windows this method also replaces the alternate path separator '/' with
3882  // the primary path separator '\\', so that for example "bar\\/\\foo" becomes
3883  // "bar\\foo".
3884 
3885  void Normalize();
3886 
3887  // Returns a pointer to the last occurence of a valid path separator in
3888  // the FilePath. On Windows, for example, both '/' and '\' are valid path
3889  // separators. Returns NULL if no path separator was found.
3890  const char * FindLastPathSeparator() const;
3891 
3892  std::string pathname_;
3893 }; // class FilePath
3894 
3895 } // namespace internal
3896 } // namespace testing
3897 
3898 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
3899 // This file was GENERATED by command:
3900 // pump.py gtest-type-util.h.pump
3901 // DO NOT EDIT BY HAND!!!
3902 
3903 // Copyright 2008 Google Inc.
3904 // All Rights Reserved.
3905 //
3906 // Redistribution and use in source and binary forms, with or without
3907 // modification, are permitted provided that the following conditions are
3908 // met:
3909 //
3910 // * Redistributions of source code must retain the above copyright
3911 // notice, this list of conditions and the following disclaimer.
3912 // * Redistributions in binary form must reproduce the above
3913 // copyright notice, this list of conditions and the following disclaimer
3914 // in the documentation and/or other materials provided with the
3915 // distribution.
3916 // * Neither the name of Google Inc. nor the names of its
3917 // contributors may be used to endorse or promote products derived from
3918 // this software without specific prior written permission.
3919 //
3920 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3921 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3922 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3923 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3924 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3925 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3926 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3927 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3928 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3929 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3930 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3931 //
3932 // Author: wan@google.com (Zhanyong Wan)
3933 
3934 // Type utilities needed for implementing typed and type-parameterized
3935 // tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
3936 //
3937 // Currently we support at most 50 types in a list, and at most 50
3938 // type-parameterized tests in one type-parameterized test case.
3939 // Please contact googletestframework@googlegroups.com if you need
3940 // more.
3941 
3942 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
3943 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
3944 
3945 
3946 // #ifdef __GNUC__ is too general here. It is possible to use gcc without using
3947 // libstdc++ (which is where cxxabi.h comes from).
3948 # if GTEST_HAS_CXXABI_H_
3949 # include <cxxabi.h>
3950 # elif defined(__HP_aCC)
3951 # include <acxx_demangle.h>
3952 # endif // GTEST_HASH_CXXABI_H_
3953 
3954 namespace testing
3955 {
3956 namespace internal
3957 {
3958 
3959 // GetTypeName<T>() returns a human-readable name of type T.
3960 // NB: This function is also used in Google Mock, so don't move it inside of
3961 // the typed-test-only section below.
3962 template <typename T>
3964 {
3965 # if GTEST_HAS_RTTI
3966 
3967  const char * const name = typeid(T).name();
3968 # if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)
3969  int status = 0;
3970  // gcc's implementation of typeid(T).name() mangles the type name,
3971  // so we have to demangle it.
3972 # if GTEST_HAS_CXXABI_H_
3973  using abi::__cxa_demangle;
3974 # endif // GTEST_HAS_CXXABI_H_
3975  char * const readable_name = __cxa_demangle(name, 0, 0, &status);
3976  const std::string name_str(status == 0 ? readable_name : name);
3977  free(readable_name);
3978  return name_str;
3979 # else
3980  return name;
3981 # endif // GTEST_HAS_CXXABI_H_ || __HP_aCC
3982 
3983 # else
3984 
3985  return "<type>";
3986 
3987 # endif // GTEST_HAS_RTTI
3988 }
3989 
3990 #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
3991 
3992 // AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same
3993 // type. This can be used as a compile-time assertion to ensure that
3994 // two types are equal.
3995 
3996 template <typename T1, typename T2>
3997 struct AssertTypeEq;
3998 
3999 template <typename T>
4000 struct AssertTypeEq<T, T>
4001 {
4002  typedef bool type;
4003 };
4004 
4005 // A unique type used as the default value for the arguments of class
4006 // template Types. This allows us to simulate variadic templates
4007 // (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't
4008 // support directly.
4009 struct None {};
4010 
4011 // The following family of struct and struct templates are used to
4012 // represent type lists. In particular, TypesN<T1, T2, ..., TN>
4013 // represents a type list with N types (T1, T2, ..., and TN) in it.
4014 // Except for Types0, every struct in the family has two member types:
4015 // Head for the first type in the list, and Tail for the rest of the
4016 // list.
4017 
4018 // The empty type list.
4019 struct Types0 {};
4020 
4021 // Type lists of length 1, 2, 3, and so on.
4022 
4023 template <typename T1>
4024 struct Types1
4025 {
4026  typedef T1 Head;
4027  typedef Types0 Tail;
4028 };
4029 template <typename T1, typename T2>
4030 struct Types2
4031 {
4032  typedef T1 Head;
4033  typedef Types1<T2> Tail;
4034 };
4035 
4036 template <typename T1, typename T2, typename T3>
4037 struct Types3
4038 {
4039  typedef T1 Head;
4040  typedef Types2<T2, T3> Tail;
4041 };
4042 
4043 template <typename T1, typename T2, typename T3, typename T4>
4044 struct Types4
4045 {
4046  typedef T1 Head;
4047  typedef Types3<T2, T3, T4> Tail;
4048 };
4049 
4050 template <typename T1, typename T2, typename T3, typename T4, typename T5>
4051 struct Types5
4052 {
4053  typedef T1 Head;
4054  typedef Types4<T2, T3, T4, T5> Tail;
4055 };
4056 
4057 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4058  typename T6>
4059 struct Types6
4060 {
4061  typedef T1 Head;
4062  typedef Types5<T2, T3, T4, T5, T6> Tail;
4063 };
4064 
4065 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4066  typename T6, typename T7>
4067 struct Types7
4068 {
4069  typedef T1 Head;
4070  typedef Types6<T2, T3, T4, T5, T6, T7> Tail;
4071 };
4072 
4073 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4074  typename T6, typename T7, typename T8>
4075 struct Types8
4076 {
4077  typedef T1 Head;
4078  typedef Types7<T2, T3, T4, T5, T6, T7, T8> Tail;
4079 };
4080 
4081 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4082  typename T6, typename T7, typename T8, typename T9>
4083 struct Types9
4084 {
4085  typedef T1 Head;
4086  typedef Types8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
4087 };
4088 
4089 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4090  typename T6, typename T7, typename T8, typename T9, typename T10>
4091 struct Types10
4092 {
4093  typedef T1 Head;
4094  typedef Types9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
4095 };
4096 
4097 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4098  typename T6, typename T7, typename T8, typename T9, typename T10,
4099  typename T11>
4100 struct Types11
4101 {
4102  typedef T1 Head;
4103  typedef Types10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
4104 };
4105 
4106 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4107  typename T6, typename T7, typename T8, typename T9, typename T10,
4108  typename T11, typename T12>
4109 struct Types12
4110 {
4111  typedef T1 Head;
4112  typedef Types11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
4113 };
4114 
4115 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4116  typename T6, typename T7, typename T8, typename T9, typename T10,
4117  typename T11, typename T12, typename T13>
4118 struct Types13
4119 {
4120  typedef T1 Head;
4121  typedef Types12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
4122 };
4123 
4124 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4125  typename T6, typename T7, typename T8, typename T9, typename T10,
4126  typename T11, typename T12, typename T13, typename T14>
4127 struct Types14
4128 {
4129  typedef T1 Head;
4130  typedef Types13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tail;
4131 };
4132 
4133 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4134  typename T6, typename T7, typename T8, typename T9, typename T10,
4135  typename T11, typename T12, typename T13, typename T14, typename T15>
4136 struct Types15
4137 {
4138  typedef T1 Head;
4139  typedef Types14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
4140  T15> Tail;
4141 };
4142 
4143 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4144  typename T6, typename T7, typename T8, typename T9, typename T10,
4145  typename T11, typename T12, typename T13, typename T14, typename T15,
4146  typename T16>
4147 struct Types16
4148 {
4149  typedef T1 Head;
4150  typedef Types15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4151  T16> Tail;
4152 };
4153 
4154 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4155  typename T6, typename T7, typename T8, typename T9, typename T10,
4156  typename T11, typename T12, typename T13, typename T14, typename T15,
4157  typename T16, typename T17>
4158 struct Types17
4159 {
4160  typedef T1 Head;
4161  typedef Types16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4162  T16, T17> Tail;
4163 };
4164 
4165 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4166  typename T6, typename T7, typename T8, typename T9, typename T10,
4167  typename T11, typename T12, typename T13, typename T14, typename T15,
4168  typename T16, typename T17, typename T18>
4169 struct Types18
4170 {
4171  typedef T1 Head;
4172  typedef Types17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4173  T16, T17, T18> Tail;
4174 };
4175 
4176 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4177  typename T6, typename T7, typename T8, typename T9, typename T10,
4178  typename T11, typename T12, typename T13, typename T14, typename T15,
4179  typename T16, typename T17, typename T18, typename T19>
4180 struct Types19
4181 {
4182  typedef T1 Head;
4183  typedef Types18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4184  T16, T17, T18, T19> Tail;
4185 };
4186 
4187 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4188  typename T6, typename T7, typename T8, typename T9, typename T10,
4189  typename T11, typename T12, typename T13, typename T14, typename T15,
4190  typename T16, typename T17, typename T18, typename T19, typename T20>
4191 struct Types20
4192 {
4193  typedef T1 Head;
4194  typedef Types19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4195  T16, T17, T18, T19, T20> Tail;
4196 };
4197 
4198 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4199  typename T6, typename T7, typename T8, typename T9, typename T10,
4200  typename T11, typename T12, typename T13, typename T14, typename T15,
4201  typename T16, typename T17, typename T18, typename T19, typename T20,
4202  typename T21>
4203 struct Types21
4204 {
4205  typedef T1 Head;
4206  typedef Types20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4207  T16, T17, T18, T19, T20, T21> Tail;
4208 };
4209 
4210 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4211  typename T6, typename T7, typename T8, typename T9, typename T10,
4212  typename T11, typename T12, typename T13, typename T14, typename T15,
4213  typename T16, typename T17, typename T18, typename T19, typename T20,
4214  typename T21, typename T22>
4215 struct Types22
4216 {
4217  typedef T1 Head;
4218  typedef Types21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4219  T16, T17, T18, T19, T20, T21, T22> Tail;
4220 };
4221 
4222 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4223  typename T6, typename T7, typename T8, typename T9, typename T10,
4224  typename T11, typename T12, typename T13, typename T14, typename T15,
4225  typename T16, typename T17, typename T18, typename T19, typename T20,
4226  typename T21, typename T22, typename T23>
4227 struct Types23
4228 {
4229  typedef T1 Head;
4230  typedef Types22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4231  T16, T17, T18, T19, T20, T21, T22, T23> Tail;
4232 };
4233 
4234 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4235  typename T6, typename T7, typename T8, typename T9, typename T10,
4236  typename T11, typename T12, typename T13, typename T14, typename T15,
4237  typename T16, typename T17, typename T18, typename T19, typename T20,
4238  typename T21, typename T22, typename T23, typename T24>
4239 struct Types24
4240 {
4241  typedef T1 Head;
4242  typedef Types23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4243  T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
4244 };
4245 
4246 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4247  typename T6, typename T7, typename T8, typename T9, typename T10,
4248  typename T11, typename T12, typename T13, typename T14, typename T15,
4249  typename T16, typename T17, typename T18, typename T19, typename T20,
4250  typename T21, typename T22, typename T23, typename T24, typename T25>
4251 struct Types25
4252 {
4253  typedef T1 Head;
4254  typedef Types24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4255  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
4256 };
4257 
4258 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4259  typename T6, typename T7, typename T8, typename T9, typename T10,
4260  typename T11, typename T12, typename T13, typename T14, typename T15,
4261  typename T16, typename T17, typename T18, typename T19, typename T20,
4262  typename T21, typename T22, typename T23, typename T24, typename T25,
4263  typename T26>
4264 struct Types26
4265 {
4266  typedef T1 Head;
4267  typedef Types25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4268  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
4269 };
4270 
4271 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4272  typename T6, typename T7, typename T8, typename T9, typename T10,
4273  typename T11, typename T12, typename T13, typename T14, typename T15,
4274  typename T16, typename T17, typename T18, typename T19, typename T20,
4275  typename T21, typename T22, typename T23, typename T24, typename T25,
4276  typename T26, typename T27>
4277 struct Types27
4278 {
4279  typedef T1 Head;
4280  typedef Types26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4281  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
4282 };
4283 
4284 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4285  typename T6, typename T7, typename T8, typename T9, typename T10,
4286  typename T11, typename T12, typename T13, typename T14, typename T15,
4287  typename T16, typename T17, typename T18, typename T19, typename T20,
4288  typename T21, typename T22, typename T23, typename T24, typename T25,
4289  typename T26, typename T27, typename T28>
4290 struct Types28
4291 {
4292  typedef T1 Head;
4293  typedef Types27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4294  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28> Tail;
4295 };
4296 
4297 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4298  typename T6, typename T7, typename T8, typename T9, typename T10,
4299  typename T11, typename T12, typename T13, typename T14, typename T15,
4300  typename T16, typename T17, typename T18, typename T19, typename T20,
4301  typename T21, typename T22, typename T23, typename T24, typename T25,
4302  typename T26, typename T27, typename T28, typename T29>
4303 struct Types29
4304 {
4305  typedef T1 Head;
4306  typedef Types28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4307  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
4308  T29> Tail;
4309 };
4310 
4311 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4312  typename T6, typename T7, typename T8, typename T9, typename T10,
4313  typename T11, typename T12, typename T13, typename T14, typename T15,
4314  typename T16, typename T17, typename T18, typename T19, typename T20,
4315  typename T21, typename T22, typename T23, typename T24, typename T25,
4316  typename T26, typename T27, typename T28, typename T29, typename T30>
4317 struct Types30
4318 {
4319  typedef T1 Head;
4320  typedef Types29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4321  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4322  T30> Tail;
4323 };
4324 
4325 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4326  typename T6, typename T7, typename T8, typename T9, typename T10,
4327  typename T11, typename T12, typename T13, typename T14, typename T15,
4328  typename T16, typename T17, typename T18, typename T19, typename T20,
4329  typename T21, typename T22, typename T23, typename T24, typename T25,
4330  typename T26, typename T27, typename T28, typename T29, typename T30,
4331  typename T31>
4332 struct Types31
4333 {
4334  typedef T1 Head;
4335  typedef Types30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4336  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4337  T30, T31> Tail;
4338 };
4339 
4340 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4341  typename T6, typename T7, typename T8, typename T9, typename T10,
4342  typename T11, typename T12, typename T13, typename T14, typename T15,
4343  typename T16, typename T17, typename T18, typename T19, typename T20,
4344  typename T21, typename T22, typename T23, typename T24, typename T25,
4345  typename T26, typename T27, typename T28, typename T29, typename T30,
4346  typename T31, typename T32>
4347 struct Types32
4348 {
4349  typedef T1 Head;
4350  typedef Types31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4351  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4352  T30, T31, T32> Tail;
4353 };
4354 
4355 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4356  typename T6, typename T7, typename T8, typename T9, typename T10,
4357  typename T11, typename T12, typename T13, typename T14, typename T15,
4358  typename T16, typename T17, typename T18, typename T19, typename T20,
4359  typename T21, typename T22, typename T23, typename T24, typename T25,
4360  typename T26, typename T27, typename T28, typename T29, typename T30,
4361  typename T31, typename T32, typename T33>
4362 struct Types33
4363 {
4364  typedef T1 Head;
4365  typedef Types32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4366  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4367  T30, T31, T32, T33> Tail;
4368 };
4369 
4370 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4371  typename T6, typename T7, typename T8, typename T9, typename T10,
4372  typename T11, typename T12, typename T13, typename T14, typename T15,
4373  typename T16, typename T17, typename T18, typename T19, typename T20,
4374  typename T21, typename T22, typename T23, typename T24, typename T25,
4375  typename T26, typename T27, typename T28, typename T29, typename T30,
4376  typename T31, typename T32, typename T33, typename T34>
4377 struct Types34
4378 {
4379  typedef T1 Head;
4380  typedef Types33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4381  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4382  T30, T31, T32, T33, T34> Tail;
4383 };
4384 
4385 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4386  typename T6, typename T7, typename T8, typename T9, typename T10,
4387  typename T11, typename T12, typename T13, typename T14, typename T15,
4388  typename T16, typename T17, typename T18, typename T19, typename T20,
4389  typename T21, typename T22, typename T23, typename T24, typename T25,
4390  typename T26, typename T27, typename T28, typename T29, typename T30,
4391  typename T31, typename T32, typename T33, typename T34, typename T35>
4392 struct Types35
4393 {
4394  typedef T1 Head;
4395  typedef Types34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4396  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4397  T30, T31, T32, T33, T34, T35> Tail;
4398 };
4399 
4400 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4401  typename T6, typename T7, typename T8, typename T9, typename T10,
4402  typename T11, typename T12, typename T13, typename T14, typename T15,
4403  typename T16, typename T17, typename T18, typename T19, typename T20,
4404  typename T21, typename T22, typename T23, typename T24, typename T25,
4405  typename T26, typename T27, typename T28, typename T29, typename T30,
4406  typename T31, typename T32, typename T33, typename T34, typename T35,
4407  typename T36>
4408 struct Types36
4409 {
4410  typedef T1 Head;
4411  typedef Types35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4412  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4413  T30, T31, T32, T33, T34, T35, T36> Tail;
4414 };
4415 
4416 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4417  typename T6, typename T7, typename T8, typename T9, typename T10,
4418  typename T11, typename T12, typename T13, typename T14, typename T15,
4419  typename T16, typename T17, typename T18, typename T19, typename T20,
4420  typename T21, typename T22, typename T23, typename T24, typename T25,
4421  typename T26, typename T27, typename T28, typename T29, typename T30,
4422  typename T31, typename T32, typename T33, typename T34, typename T35,
4423  typename T36, typename T37>
4424 struct Types37
4425 {
4426  typedef T1 Head;
4427  typedef Types36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4428  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4429  T30, T31, T32, T33, T34, T35, T36, T37> Tail;
4430 };
4431 
4432 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4433  typename T6, typename T7, typename T8, typename T9, typename T10,
4434  typename T11, typename T12, typename T13, typename T14, typename T15,
4435  typename T16, typename T17, typename T18, typename T19, typename T20,
4436  typename T21, typename T22, typename T23, typename T24, typename T25,
4437  typename T26, typename T27, typename T28, typename T29, typename T30,
4438  typename T31, typename T32, typename T33, typename T34, typename T35,
4439  typename T36, typename T37, typename T38>
4440 struct Types38
4441 {
4442  typedef T1 Head;
4443  typedef Types37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4444  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4445  T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
4446 };
4447 
4448 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4449  typename T6, typename T7, typename T8, typename T9, typename T10,
4450  typename T11, typename T12, typename T13, typename T14, typename T15,
4451  typename T16, typename T17, typename T18, typename T19, typename T20,
4452  typename T21, typename T22, typename T23, typename T24, typename T25,
4453  typename T26, typename T27, typename T28, typename T29, typename T30,
4454  typename T31, typename T32, typename T33, typename T34, typename T35,
4455  typename T36, typename T37, typename T38, typename T39>
4456 struct Types39
4457 {
4458  typedef T1 Head;
4459  typedef Types38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4460  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4461  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
4462 };
4463 
4464 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4465  typename T6, typename T7, typename T8, typename T9, typename T10,
4466  typename T11, typename T12, typename T13, typename T14, typename T15,
4467  typename T16, typename T17, typename T18, typename T19, typename T20,
4468  typename T21, typename T22, typename T23, typename T24, typename T25,
4469  typename T26, typename T27, typename T28, typename T29, typename T30,
4470  typename T31, typename T32, typename T33, typename T34, typename T35,
4471  typename T36, typename T37, typename T38, typename T39, typename T40>
4472 struct Types40
4473 {
4474  typedef T1 Head;
4475  typedef Types39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4476  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4477  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
4478 };
4479 
4480 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4481  typename T6, typename T7, typename T8, typename T9, typename T10,
4482  typename T11, typename T12, typename T13, typename T14, typename T15,
4483  typename T16, typename T17, typename T18, typename T19, typename T20,
4484  typename T21, typename T22, typename T23, typename T24, typename T25,
4485  typename T26, typename T27, typename T28, typename T29, typename T30,
4486  typename T31, typename T32, typename T33, typename T34, typename T35,
4487  typename T36, typename T37, typename T38, typename T39, typename T40,
4488  typename T41>
4489 struct Types41
4490 {
4491  typedef T1 Head;
4492  typedef Types40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4493  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4494  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
4495 };
4496 
4497 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4498  typename T6, typename T7, typename T8, typename T9, typename T10,
4499  typename T11, typename T12, typename T13, typename T14, typename T15,
4500  typename T16, typename T17, typename T18, typename T19, typename T20,
4501  typename T21, typename T22, typename T23, typename T24, typename T25,
4502  typename T26, typename T27, typename T28, typename T29, typename T30,
4503  typename T31, typename T32, typename T33, typename T34, typename T35,
4504  typename T36, typename T37, typename T38, typename T39, typename T40,
4505  typename T41, typename T42>
4506 struct Types42
4507 {
4508  typedef T1 Head;
4509  typedef Types41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4510  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4511  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42> Tail;
4512 };
4513 
4514 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4515  typename T6, typename T7, typename T8, typename T9, typename T10,
4516  typename T11, typename T12, typename T13, typename T14, typename T15,
4517  typename T16, typename T17, typename T18, typename T19, typename T20,
4518  typename T21, typename T22, typename T23, typename T24, typename T25,
4519  typename T26, typename T27, typename T28, typename T29, typename T30,
4520  typename T31, typename T32, typename T33, typename T34, typename T35,
4521  typename T36, typename T37, typename T38, typename T39, typename T40,
4522  typename T41, typename T42, typename T43>
4523 struct Types43
4524 {
4525  typedef T1 Head;
4526  typedef Types42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4527  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4528  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
4529  T43> Tail;
4530 };
4531 
4532 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4533  typename T6, typename T7, typename T8, typename T9, typename T10,
4534  typename T11, typename T12, typename T13, typename T14, typename T15,
4535  typename T16, typename T17, typename T18, typename T19, typename T20,
4536  typename T21, typename T22, typename T23, typename T24, typename T25,
4537  typename T26, typename T27, typename T28, typename T29, typename T30,
4538  typename T31, typename T32, typename T33, typename T34, typename T35,
4539  typename T36, typename T37, typename T38, typename T39, typename T40,
4540  typename T41, typename T42, typename T43, typename T44>
4541 struct Types44
4542 {
4543  typedef T1 Head;
4544  typedef Types43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4545  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4546  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4547  T44> Tail;
4548 };
4549 
4550 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4551  typename T6, typename T7, typename T8, typename T9, typename T10,
4552  typename T11, typename T12, typename T13, typename T14, typename T15,
4553  typename T16, typename T17, typename T18, typename T19, typename T20,
4554  typename T21, typename T22, typename T23, typename T24, typename T25,
4555  typename T26, typename T27, typename T28, typename T29, typename T30,
4556  typename T31, typename T32, typename T33, typename T34, typename T35,
4557  typename T36, typename T37, typename T38, typename T39, typename T40,
4558  typename T41, typename T42, typename T43, typename T44, typename T45>
4559 struct Types45
4560 {
4561  typedef T1 Head;
4562  typedef Types44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4563  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4564  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4565  T44, T45> Tail;
4566 };
4567 
4568 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4569  typename T6, typename T7, typename T8, typename T9, typename T10,
4570  typename T11, typename T12, typename T13, typename T14, typename T15,
4571  typename T16, typename T17, typename T18, typename T19, typename T20,
4572  typename T21, typename T22, typename T23, typename T24, typename T25,
4573  typename T26, typename T27, typename T28, typename T29, typename T30,
4574  typename T31, typename T32, typename T33, typename T34, typename T35,
4575  typename T36, typename T37, typename T38, typename T39, typename T40,
4576  typename T41, typename T42, typename T43, typename T44, typename T45,
4577  typename T46>
4578 struct Types46
4579 {
4580  typedef T1 Head;
4581  typedef Types45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4582  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4583  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4584  T44, T45, T46> Tail;
4585 };
4586 
4587 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4588  typename T6, typename T7, typename T8, typename T9, typename T10,
4589  typename T11, typename T12, typename T13, typename T14, typename T15,
4590  typename T16, typename T17, typename T18, typename T19, typename T20,
4591  typename T21, typename T22, typename T23, typename T24, typename T25,
4592  typename T26, typename T27, typename T28, typename T29, typename T30,
4593  typename T31, typename T32, typename T33, typename T34, typename T35,
4594  typename T36, typename T37, typename T38, typename T39, typename T40,
4595  typename T41, typename T42, typename T43, typename T44, typename T45,
4596  typename T46, typename T47>
4597 struct Types47
4598 {
4599  typedef T1 Head;
4600  typedef Types46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4601  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4602  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4603  T44, T45, T46, T47> Tail;
4604 };
4605 
4606 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4607  typename T6, typename T7, typename T8, typename T9, typename T10,
4608  typename T11, typename T12, typename T13, typename T14, typename T15,
4609  typename T16, typename T17, typename T18, typename T19, typename T20,
4610  typename T21, typename T22, typename T23, typename T24, typename T25,
4611  typename T26, typename T27, typename T28, typename T29, typename T30,
4612  typename T31, typename T32, typename T33, typename T34, typename T35,
4613  typename T36, typename T37, typename T38, typename T39, typename T40,
4614  typename T41, typename T42, typename T43, typename T44, typename T45,
4615  typename T46, typename T47, typename T48>
4616 struct Types48
4617 {
4618  typedef T1 Head;
4619  typedef Types47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4620  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4621  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4622  T44, T45, T46, T47, T48> Tail;
4623 };
4624 
4625 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4626  typename T6, typename T7, typename T8, typename T9, typename T10,
4627  typename T11, typename T12, typename T13, typename T14, typename T15,
4628  typename T16, typename T17, typename T18, typename T19, typename T20,
4629  typename T21, typename T22, typename T23, typename T24, typename T25,
4630  typename T26, typename T27, typename T28, typename T29, typename T30,
4631  typename T31, typename T32, typename T33, typename T34, typename T35,
4632  typename T36, typename T37, typename T38, typename T39, typename T40,
4633  typename T41, typename T42, typename T43, typename T44, typename T45,
4634  typename T46, typename T47, typename T48, typename T49>
4635 struct Types49
4636 {
4637  typedef T1 Head;
4638  typedef Types48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4639  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4640  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4641  T44, T45, T46, T47, T48, T49> Tail;
4642 };
4643 
4644 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4645  typename T6, typename T7, typename T8, typename T9, typename T10,
4646  typename T11, typename T12, typename T13, typename T14, typename T15,
4647  typename T16, typename T17, typename T18, typename T19, typename T20,
4648  typename T21, typename T22, typename T23, typename T24, typename T25,
4649  typename T26, typename T27, typename T28, typename T29, typename T30,
4650  typename T31, typename T32, typename T33, typename T34, typename T35,
4651  typename T36, typename T37, typename T38, typename T39, typename T40,
4652  typename T41, typename T42, typename T43, typename T44, typename T45,
4653  typename T46, typename T47, typename T48, typename T49, typename T50>
4654 struct Types50
4655 {
4656  typedef T1 Head;
4657  typedef Types49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4658  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4659  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4660  T44, T45, T46, T47, T48, T49, T50> Tail;
4661 };
4662 
4663 
4664 } // namespace internal
4665 
4666 // We don't want to require the users to write TypesN<...> directly,
4667 // as that would require them to count the length. Types<...> is much
4668 // easier to write, but generates horrible messages when there is a
4669 // compiler error, as gcc insists on printing out each template
4670 // argument, even if it has the default value (this means Types<int>
4671 // will appear as Types<int, None, None, ..., None> in the compiler
4672 // errors).
4673 //
4674 // Our solution is to combine the best part of the two approaches: a
4675 // user would write Types<T1, ..., TN>, and Google Test will translate
4676 // that to TypesN<T1, ..., TN> internally to make error messages
4677 // readable. The translation is done by the 'type' member of the
4678 // Types template.
4679 template <typename T1 = internal::None, typename T2 = internal::None,
4680  typename T3 = internal::None, typename T4 = internal::None,
4681  typename T5 = internal::None, typename T6 = internal::None,
4682  typename T7 = internal::None, typename T8 = internal::None,
4683  typename T9 = internal::None, typename T10 = internal::None,
4684  typename T11 = internal::None, typename T12 = internal::None,
4685  typename T13 = internal::None, typename T14 = internal::None,
4686  typename T15 = internal::None, typename T16 = internal::None,
4687  typename T17 = internal::None, typename T18 = internal::None,
4688  typename T19 = internal::None, typename T20 = internal::None,
4689  typename T21 = internal::None, typename T22 = internal::None,
4690  typename T23 = internal::None, typename T24 = internal::None,
4691  typename T25 = internal::None, typename T26 = internal::None,
4692  typename T27 = internal::None, typename T28 = internal::None,
4693  typename T29 = internal::None, typename T30 = internal::None,
4694  typename T31 = internal::None, typename T32 = internal::None,
4695  typename T33 = internal::None, typename T34 = internal::None,
4696  typename T35 = internal::None, typename T36 = internal::None,
4697  typename T37 = internal::None, typename T38 = internal::None,
4698  typename T39 = internal::None, typename T40 = internal::None,
4699  typename T41 = internal::None, typename T42 = internal::None,
4700  typename T43 = internal::None, typename T44 = internal::None,
4701  typename T45 = internal::None, typename T46 = internal::None,
4702  typename T47 = internal::None, typename T48 = internal::None,
4703  typename T49 = internal::None, typename T50 = internal::None>
4704 struct Types
4705 {
4706  typedef internal::Types50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4707  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4708  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
4709  T41, T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
4710 };
4711 
4712 template <>
4713 struct Types<internal::None, internal::None, internal::None, internal::None,
4714  internal::None, internal::None, internal::None, internal::None,
4715  internal::None, internal::None, internal::None, internal::None,
4716  internal::None, internal::None, internal::None, internal::None,
4717  internal::None, internal::None, internal::None, internal::None,
4718  internal::None, internal::None, internal::None, internal::None,
4719  internal::None, internal::None, internal::None, internal::None,
4720  internal::None, internal::None, internal::None, internal::None,
4721  internal::None, internal::None, internal::None, internal::None,
4722  internal::None, internal::None, internal::None, internal::None,
4723  internal::None, internal::None, internal::None, internal::None,
4724  internal::None, internal::None, internal::None, internal::None,
4725  internal::None, internal::None>
4726 {
4727  typedef internal::Types0 type;
4728 };
4729 template <typename T1>
4730 struct Types<T1, internal::None, internal::None, internal::None,
4731  internal::None, internal::None, internal::None, internal::None,
4732  internal::None, internal::None, internal::None, internal::None,
4733  internal::None, internal::None, internal::None, internal::None,
4734  internal::None, internal::None, internal::None, internal::None,
4735  internal::None, internal::None, internal::None, internal::None,
4736  internal::None, internal::None, internal::None, internal::None,
4737  internal::None, internal::None, internal::None, internal::None,
4738  internal::None, internal::None, internal::None, internal::None,
4739  internal::None, internal::None, internal::None, internal::None,
4740  internal::None, internal::None, internal::None, internal::None,
4741  internal::None, internal::None, internal::None, internal::None,
4742  internal::None, internal::None>
4743 {
4744  typedef internal::Types1<T1> type;
4745 };
4746 template <typename T1, typename T2>
4747 struct Types<T1, T2, internal::None, internal::None, internal::None,
4748  internal::None, internal::None, internal::None, internal::None,
4749  internal::None, internal::None, internal::None, internal::None,
4750  internal::None, internal::None, internal::None, internal::None,
4751  internal::None, internal::None, internal::None, internal::None,
4752  internal::None, internal::None, internal::None, internal::None,
4753  internal::None, internal::None, internal::None, internal::None,
4754  internal::None, internal::None, internal::None, internal::None,
4755  internal::None, internal::None, internal::None, internal::None,
4756  internal::None, internal::None, internal::None, internal::None,
4757  internal::None, internal::None, internal::None, internal::None,
4758  internal::None, internal::None, internal::None, internal::None,
4759  internal::None>
4760 {
4761  typedef internal::Types2<T1, T2> type;
4762 };
4763 template <typename T1, typename T2, typename T3>
4764 struct Types<T1, T2, T3, internal::None, internal::None, internal::None,
4765  internal::None, internal::None, internal::None, internal::None,
4766  internal::None, internal::None, internal::None, internal::None,
4767  internal::None, internal::None, internal::None, internal::None,
4768  internal::None, internal::None, internal::None, internal::None,
4769  internal::None, internal::None, internal::None, internal::None,
4770  internal::None, internal::None, internal::None, internal::None,
4771  internal::None, internal::None, internal::None, internal::None,
4772  internal::None, internal::None, internal::None, internal::None,
4773  internal::None, internal::None, internal::None, internal::None,
4774  internal::None, internal::None, internal::None, internal::None,
4775  internal::None, internal::None, internal::None, internal::None>
4776 {
4777  typedef internal::Types3<T1, T2, T3> type;
4778 };
4779 template <typename T1, typename T2, typename T3, typename T4>
4780 struct Types<T1, T2, T3, T4, internal::None, internal::None, internal::None,
4781  internal::None, internal::None, internal::None, internal::None,
4782  internal::None, internal::None, internal::None, internal::None,
4783  internal::None, internal::None, internal::None, internal::None,
4784  internal::None, internal::None, internal::None, internal::None,
4785  internal::None, internal::None, internal::None, internal::None,
4786  internal::None, internal::None, internal::None, internal::None,
4787  internal::None, internal::None, internal::None, internal::None,
4788  internal::None, internal::None, internal::None, internal::None,
4789  internal::None, internal::None, internal::None, internal::None,
4790  internal::None, internal::None, internal::None, internal::None,
4791  internal::None, internal::None, internal::None>
4792 {
4793  typedef internal::Types4<T1, T2, T3, T4> type;
4794 };
4795 template <typename T1, typename T2, typename T3, typename T4, typename T5>
4796 struct Types<T1, T2, T3, T4, T5, internal::None, internal::None,
4797  internal::None, internal::None, internal::None, internal::None,
4798  internal::None, internal::None, internal::None, internal::None,
4799  internal::None, internal::None, internal::None, internal::None,
4800  internal::None, internal::None, internal::None, internal::None,
4801  internal::None, internal::None, internal::None, internal::None,
4802  internal::None, internal::None, internal::None, internal::None,
4803  internal::None, internal::None, internal::None, internal::None,
4804  internal::None, internal::None, internal::None, internal::None,
4805  internal::None, internal::None, internal::None, internal::None,
4806  internal::None, internal::None, internal::None, internal::None,
4807  internal::None, internal::None, internal::None>
4808 {
4809  typedef internal::Types5<T1, T2, T3, T4, T5> type;
4810 };
4811 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4812  typename T6>
4813 struct Types<T1, T2, T3, T4, T5, T6, internal::None, internal::None,
4814  internal::None, internal::None, internal::None, internal::None,
4815  internal::None, internal::None, internal::None, internal::None,
4816  internal::None, internal::None, internal::None, internal::None,
4817  internal::None, internal::None, internal::None, internal::None,
4818  internal::None, internal::None, internal::None, internal::None,
4819  internal::None, internal::None, internal::None, internal::None,
4820  internal::None, internal::None, internal::None, internal::None,
4821  internal::None, internal::None, internal::None, internal::None,
4822  internal::None, internal::None, internal::None, internal::None,
4823  internal::None, internal::None, internal::None, internal::None,
4824  internal::None, internal::None>
4825 {
4826  typedef internal::Types6<T1, T2, T3, T4, T5, T6> type;
4827 };
4828 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4829  typename T6, typename T7>
4830 struct Types<T1, T2, T3, T4, T5, T6, T7, internal::None, internal::None,
4831  internal::None, internal::None, internal::None, internal::None,
4832  internal::None, internal::None, internal::None, internal::None,
4833  internal::None, internal::None, internal::None, internal::None,
4834  internal::None, internal::None, internal::None, internal::None,
4835  internal::None, internal::None, internal::None, internal::None,
4836  internal::None, internal::None, internal::None, internal::None,
4837  internal::None, internal::None, internal::None, internal::None,
4838  internal::None, internal::None, internal::None, internal::None,
4839  internal::None, internal::None, internal::None, internal::None,
4840  internal::None, internal::None, internal::None, internal::None,
4841  internal::None>
4842 {
4843  typedef internal::Types7<T1, T2, T3, T4, T5, T6, T7> type;
4844 };
4845 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4846  typename T6, typename T7, typename T8>
4847 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, internal::None, internal::None,
4848  internal::None, internal::None, internal::None, internal::None,
4849  internal::None, internal::None, internal::None, internal::None,
4850  internal::None, internal::None, internal::None, internal::None,
4851  internal::None, internal::None, internal::None, internal::None,
4852  internal::None, internal::None, internal::None, internal::None,
4853  internal::None, internal::None, internal::None, internal::None,
4854  internal::None, internal::None, internal::None, internal::None,
4855  internal::None, internal::None, internal::None, internal::None,
4856  internal::None, internal::None, internal::None, internal::None,
4857  internal::None, internal::None, internal::None, internal::None>
4858 {
4859  typedef internal::Types8<T1, T2, T3, T4, T5, T6, T7, T8> type;
4860 };
4861 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4862  typename T6, typename T7, typename T8, typename T9>
4863 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, internal::None,
4864  internal::None, internal::None, internal::None, internal::None,
4865  internal::None, internal::None, internal::None, internal::None,
4866  internal::None, internal::None, internal::None, internal::None,
4867  internal::None, internal::None, internal::None, internal::None,
4868  internal::None, internal::None, internal::None, internal::None,
4869  internal::None, internal::None, internal::None, internal::None,
4870  internal::None, internal::None, internal::None, internal::None,
4871  internal::None, internal::None, internal::None, internal::None,
4872  internal::None, internal::None, internal::None, internal::None,
4873  internal::None, internal::None, internal::None, internal::None>
4874 {
4875  typedef internal::Types9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
4876 };
4877 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4878  typename T6, typename T7, typename T8, typename T9, typename T10>
4879 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, internal::None,
4880  internal::None, internal::None, internal::None, internal::None,
4881  internal::None, internal::None, internal::None, internal::None,
4882  internal::None, internal::None, internal::None, internal::None,
4883  internal::None, internal::None, internal::None, internal::None,
4884  internal::None, internal::None, internal::None, internal::None,
4885  internal::None, internal::None, internal::None, internal::None,
4886  internal::None, internal::None, internal::None, internal::None,
4887  internal::None, internal::None, internal::None, internal::None,
4888  internal::None, internal::None, internal::None, internal::None,
4889  internal::None, internal::None, internal::None>
4890 {
4891  typedef internal::Types10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
4892 };
4893 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4894  typename T6, typename T7, typename T8, typename T9, typename T10,
4895  typename T11>
4896 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, internal::None,
4897  internal::None, internal::None, internal::None, internal::None,
4898  internal::None, internal::None, internal::None, internal::None,
4899  internal::None, internal::None, internal::None, internal::None,
4900  internal::None, internal::None, internal::None, internal::None,
4901  internal::None, internal::None, internal::None, internal::None,
4902  internal::None, internal::None, internal::None, internal::None,
4903  internal::None, internal::None, internal::None, internal::None,
4904  internal::None, internal::None, internal::None, internal::None,
4905  internal::None, internal::None, internal::None, internal::None,
4906  internal::None, internal::None>
4907 {
4908  typedef internal::Types11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
4909 };
4910 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4911  typename T6, typename T7, typename T8, typename T9, typename T10,
4912  typename T11, typename T12>
4913 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, internal::None,
4914  internal::None, internal::None, internal::None, internal::None,
4915  internal::None, internal::None, internal::None, internal::None,
4916  internal::None, internal::None, internal::None, internal::None,
4917  internal::None, internal::None, internal::None, internal::None,
4918  internal::None, internal::None, internal::None, internal::None,
4919  internal::None, internal::None, internal::None, internal::None,
4920  internal::None, internal::None, internal::None, internal::None,
4921  internal::None, internal::None, internal::None, internal::None,
4922  internal::None, internal::None, internal::None, internal::None,
4923  internal::None>
4924 {
4925  typedef internal::Types12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
4926  T12> type;
4927 };
4928 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4929  typename T6, typename T7, typename T8, typename T9, typename T10,
4930  typename T11, typename T12, typename T13>
4931 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
4932  internal::None, internal::None, internal::None, internal::None,
4933  internal::None, internal::None, internal::None, internal::None,
4934  internal::None, internal::None, internal::None, internal::None,
4935  internal::None, internal::None, internal::None, internal::None,
4936  internal::None, internal::None, internal::None, internal::None,
4937  internal::None, internal::None, internal::None, internal::None,
4938  internal::None, internal::None, internal::None, internal::None,
4939  internal::None, internal::None, internal::None, internal::None,
4940  internal::None, internal::None, internal::None, internal::None,
4941  internal::None>
4942 {
4943  typedef internal::Types13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4944  T13> type;
4945 };
4946 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4947  typename T6, typename T7, typename T8, typename T9, typename T10,
4948  typename T11, typename T12, typename T13, typename T14>
4949 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
4950  internal::None, internal::None, internal::None, internal::None,
4951  internal::None, internal::None, internal::None, internal::None,
4952  internal::None, internal::None, internal::None, internal::None,
4953  internal::None, internal::None, internal::None, internal::None,
4954  internal::None, internal::None, internal::None, internal::None,
4955  internal::None, internal::None, internal::None, internal::None,
4956  internal::None, internal::None, internal::None, internal::None,
4957  internal::None, internal::None, internal::None, internal::None,
4958  internal::None, internal::None, internal::None, internal::None>
4959 {
4960  typedef internal::Types14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4961  T13, T14> type;
4962 };
4963 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4964  typename T6, typename T7, typename T8, typename T9, typename T10,
4965  typename T11, typename T12, typename T13, typename T14, typename T15>
4966 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4967  internal::None, internal::None, internal::None, internal::None,
4968  internal::None, internal::None, internal::None, internal::None,
4969  internal::None, internal::None, internal::None, internal::None,
4970  internal::None, internal::None, internal::None, internal::None,
4971  internal::None, internal::None, internal::None, internal::None,
4972  internal::None, internal::None, internal::None, internal::None,
4973  internal::None, internal::None, internal::None, internal::None,
4974  internal::None, internal::None, internal::None, internal::None,
4975  internal::None, internal::None, internal::None>
4976 {
4977  typedef internal::Types15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4978  T13, T14, T15> type;
4979 };
4980 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4981  typename T6, typename T7, typename T8, typename T9, typename T10,
4982  typename T11, typename T12, typename T13, typename T14, typename T15,
4983  typename T16>
4984 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4985  T16, internal::None, internal::None, internal::None, internal::None,
4986  internal::None, internal::None, internal::None, internal::None,
4987  internal::None, internal::None, internal::None, internal::None,
4988  internal::None, internal::None, internal::None, internal::None,
4989  internal::None, internal::None, internal::None, internal::None,
4990  internal::None, internal::None, internal::None, internal::None,
4991  internal::None, internal::None, internal::None, internal::None,
4992  internal::None, internal::None, internal::None, internal::None,
4993  internal::None, internal::None>
4994 {
4995  typedef internal::Types16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4996  T13, T14, T15, T16> type;
4997 };
4998 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4999  typename T6, typename T7, typename T8, typename T9, typename T10,
5000  typename T11, typename T12, typename T13, typename T14, typename T15,
5001  typename T16, typename T17>
5002 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5003  T16, T17, internal::None, internal::None, internal::None, internal::None,
5004  internal::None, internal::None, internal::None, internal::None,
5005  internal::None, internal::None, internal::None, internal::None,
5006  internal::None, internal::None, internal::None, internal::None,
5007  internal::None, internal::None, internal::None, internal::None,
5008  internal::None, internal::None, internal::None, internal::None,
5009  internal::None, internal::None, internal::None, internal::None,
5010  internal::None, internal::None, internal::None, internal::None,
5011  internal::None>
5012 {
5013  typedef internal::Types17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5014  T13, T14, T15, T16, T17> type;
5015 };
5016 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5017  typename T6, typename T7, typename T8, typename T9, typename T10,
5018  typename T11, typename T12, typename T13, typename T14, typename T15,
5019  typename T16, typename T17, typename T18>
5020 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5021  T16, T17, T18, internal::None, internal::None, internal::None,
5022  internal::None, internal::None, internal::None, internal::None,
5023  internal::None, internal::None, internal::None, internal::None,
5024  internal::None, internal::None, internal::None, internal::None,
5025  internal::None, internal::None, internal::None, internal::None,
5026  internal::None, internal::None, internal::None, internal::None,
5027  internal::None, internal::None, internal::None, internal::None,
5028  internal::None, internal::None, internal::None, internal::None,
5029  internal::None>
5030 {
5031  typedef internal::Types18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5032  T13, T14, T15, T16, T17, T18> type;
5033 };
5034 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5035  typename T6, typename T7, typename T8, typename T9, typename T10,
5036  typename T11, typename T12, typename T13, typename T14, typename T15,
5037  typename T16, typename T17, typename T18, typename T19>
5038 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5039  T16, T17, T18, T19, internal::None, internal::None, internal::None,
5040  internal::None, internal::None, internal::None, internal::None,
5041  internal::None, internal::None, internal::None, internal::None,
5042  internal::None, internal::None, internal::None, internal::None,
5043  internal::None, internal::None, internal::None, internal::None,
5044  internal::None, internal::None, internal::None, internal::None,
5045  internal::None, internal::None, internal::None, internal::None,
5046  internal::None, internal::None, internal::None, internal::None>
5047 {
5048  typedef internal::Types19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5049  T13, T14, T15, T16, T17, T18, T19> type;
5050 };
5051 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5052  typename T6, typename T7, typename T8, typename T9, typename T10,
5053  typename T11, typename T12, typename T13, typename T14, typename T15,
5054  typename T16, typename T17, typename T18, typename T19, typename T20>
5055 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5056  T16, T17, T18, T19, T20, internal::None, internal::None, internal::None,
5057  internal::None, internal::None, internal::None, internal::None,
5058  internal::None, internal::None, internal::None, internal::None,
5059  internal::None, internal::None, internal::None, internal::None,
5060  internal::None, internal::None, internal::None, internal::None,
5061  internal::None, internal::None, internal::None, internal::None,
5062  internal::None, internal::None, internal::None, internal::None,
5063  internal::None, internal::None, internal::None>
5064 {
5065  typedef internal::Types20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5066  T13, T14, T15, T16, T17, T18, T19, T20> type;
5067 };
5068 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5069  typename T6, typename T7, typename T8, typename T9, typename T10,
5070  typename T11, typename T12, typename T13, typename T14, typename T15,
5071  typename T16, typename T17, typename T18, typename T19, typename T20,
5072  typename T21>
5073 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5074  T16, T17, T18, T19, T20, T21, internal::None, internal::None,
5075  internal::None, internal::None, internal::None, internal::None,
5076  internal::None, internal::None, internal::None, internal::None,
5077  internal::None, internal::None, internal::None, internal::None,
5078  internal::None, internal::None, internal::None, internal::None,
5079  internal::None, internal::None, internal::None, internal::None,
5080  internal::None, internal::None, internal::None, internal::None,
5081  internal::None, internal::None, internal::None>
5082 {
5083  typedef internal::Types21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5084  T13, T14, T15, T16, T17, T18, T19, T20, T21> type;
5085 };
5086 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5087  typename T6, typename T7, typename T8, typename T9, typename T10,
5088  typename T11, typename T12, typename T13, typename T14, typename T15,
5089  typename T16, typename T17, typename T18, typename T19, typename T20,
5090  typename T21, typename T22>
5091 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5092  T16, T17, T18, T19, T20, T21, T22, internal::None, internal::None,
5093  internal::None, internal::None, internal::None, internal::None,
5094  internal::None, internal::None, internal::None, internal::None,
5095  internal::None, internal::None, internal::None, internal::None,
5096  internal::None, internal::None, internal::None, internal::None,
5097  internal::None, internal::None, internal::None, internal::None,
5098  internal::None, internal::None, internal::None, internal::None,
5099  internal::None, internal::None>
5100 {
5101  typedef internal::Types22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5102  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
5103 };
5104 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5105  typename T6, typename T7, typename T8, typename T9, typename T10,
5106  typename T11, typename T12, typename T13, typename T14, typename T15,
5107  typename T16, typename T17, typename T18, typename T19, typename T20,
5108  typename T21, typename T22, typename T23>
5109 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5110  T16, T17, T18, T19, T20, T21, T22, T23, internal::None, internal::None,
5111  internal::None, internal::None, internal::None, internal::None,
5112  internal::None, internal::None, internal::None, internal::None,
5113  internal::None, internal::None, internal::None, internal::None,
5114  internal::None, internal::None, internal::None, internal::None,
5115  internal::None, internal::None, internal::None, internal::None,
5116  internal::None, internal::None, internal::None, internal::None,
5117  internal::None>
5118 {
5119  typedef internal::Types23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5120  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
5121 };
5122 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5123  typename T6, typename T7, typename T8, typename T9, typename T10,
5124  typename T11, typename T12, typename T13, typename T14, typename T15,
5125  typename T16, typename T17, typename T18, typename T19, typename T20,
5126  typename T21, typename T22, typename T23, typename T24>
5127 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5128  T16, T17, T18, T19, T20, T21, T22, T23, T24, internal::None,
5129  internal::None, internal::None, internal::None, internal::None,
5130  internal::None, internal::None, internal::None, internal::None,
5131  internal::None, internal::None, internal::None, internal::None,
5132  internal::None, internal::None, internal::None, internal::None,
5133  internal::None, internal::None, internal::None, internal::None,
5134  internal::None, internal::None, internal::None, internal::None,
5135  internal::None>
5136 {
5137  typedef internal::Types24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5138  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
5139 };
5140 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5141  typename T6, typename T7, typename T8, typename T9, typename T10,
5142  typename T11, typename T12, typename T13, typename T14, typename T15,
5143  typename T16, typename T17, typename T18, typename T19, typename T20,
5144  typename T21, typename T22, typename T23, typename T24, typename T25>
5145 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5146  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, internal::None,
5147  internal::None, internal::None, internal::None, internal::None,
5148  internal::None, internal::None, internal::None, internal::None,
5149  internal::None, internal::None, internal::None, internal::None,
5150  internal::None, internal::None, internal::None, internal::None,
5151  internal::None, internal::None, internal::None, internal::None,
5152  internal::None, internal::None, internal::None, internal::None>
5153 {
5154  typedef internal::Types25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5155  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
5156 };
5157 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5158  typename T6, typename T7, typename T8, typename T9, typename T10,
5159  typename T11, typename T12, typename T13, typename T14, typename T15,
5160  typename T16, typename T17, typename T18, typename T19, typename T20,
5161  typename T21, typename T22, typename T23, typename T24, typename T25,
5162  typename T26>
5163 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5164  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, internal::None,
5165  internal::None, internal::None, internal::None, internal::None,
5166  internal::None, internal::None, internal::None, internal::None,
5167  internal::None, internal::None, internal::None, internal::None,
5168  internal::None, internal::None, internal::None, internal::None,
5169  internal::None, internal::None, internal::None, internal::None,
5170  internal::None, internal::None, internal::None>
5171 {
5172  typedef internal::Types26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5173  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
5174  T26> type;
5175 };
5176 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5177  typename T6, typename T7, typename T8, typename T9, typename T10,
5178  typename T11, typename T12, typename T13, typename T14, typename T15,
5179  typename T16, typename T17, typename T18, typename T19, typename T20,
5180  typename T21, typename T22, typename T23, typename T24, typename T25,
5181  typename T26, typename T27>
5182 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5183  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, internal::None,
5184  internal::None, internal::None, internal::None, internal::None,
5185  internal::None, internal::None, internal::None, internal::None,
5186  internal::None, internal::None, internal::None, internal::None,
5187  internal::None, internal::None, internal::None, internal::None,
5188  internal::None, internal::None, internal::None, internal::None,
5189  internal::None, internal::None>
5190 {
5191  typedef internal::Types27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5192  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5193  T27> type;
5194 };
5195 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5196  typename T6, typename T7, typename T8, typename T9, typename T10,
5197  typename T11, typename T12, typename T13, typename T14, typename T15,
5198  typename T16, typename T17, typename T18, typename T19, typename T20,
5199  typename T21, typename T22, typename T23, typename T24, typename T25,
5200  typename T26, typename T27, typename T28>
5201 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5202  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5203  internal::None, internal::None, internal::None, internal::None,
5204  internal::None, internal::None, internal::None, internal::None,
5205  internal::None, internal::None, internal::None, internal::None,
5206  internal::None, internal::None, internal::None, internal::None,
5207  internal::None, internal::None, internal::None, internal::None,
5208  internal::None, internal::None>
5209 {
5210  typedef internal::Types28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5211  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5212  T27, T28> type;
5213 };
5214 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5215  typename T6, typename T7, typename T8, typename T9, typename T10,
5216  typename T11, typename T12, typename T13, typename T14, typename T15,
5217  typename T16, typename T17, typename T18, typename T19, typename T20,
5218  typename T21, typename T22, typename T23, typename T24, typename T25,
5219  typename T26, typename T27, typename T28, typename T29>
5220 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5221  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
5222  internal::None, internal::None, internal::None, internal::None,
5223  internal::None, internal::None, internal::None, internal::None,
5224  internal::None, internal::None, internal::None, internal::None,
5225  internal::None, internal::None, internal::None, internal::None,
5226  internal::None, internal::None, internal::None, internal::None,
5227  internal::None>
5228 {
5229  typedef internal::Types29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5230  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5231  T27, T28, T29> type;
5232 };
5233 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5234  typename T6, typename T7, typename T8, typename T9, typename T10,
5235  typename T11, typename T12, typename T13, typename T14, typename T15,
5236  typename T16, typename T17, typename T18, typename T19, typename T20,
5237  typename T21, typename T22, typename T23, typename T24, typename T25,
5238  typename T26, typename T27, typename T28, typename T29, typename T30>
5239 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5240  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5241  internal::None, internal::None, internal::None, internal::None,
5242  internal::None, internal::None, internal::None, internal::None,
5243  internal::None, internal::None, internal::None, internal::None,
5244  internal::None, internal::None, internal::None, internal::None,
5245  internal::None, internal::None, internal::None, internal::None>
5246 {
5247  typedef internal::Types30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5248  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5249  T27, T28, T29, T30> type;
5250 };
5251 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5252  typename T6, typename T7, typename T8, typename T9, typename T10,
5253  typename T11, typename T12, typename T13, typename T14, typename T15,
5254  typename T16, typename T17, typename T18, typename T19, typename T20,
5255  typename T21, typename T22, typename T23, typename T24, typename T25,
5256  typename T26, typename T27, typename T28, typename T29, typename T30,
5257  typename T31>
5258 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5259  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5260  T31, internal::None, internal::None, internal::None, internal::None,
5261  internal::None, internal::None, internal::None, internal::None,
5262  internal::None, internal::None, internal::None, internal::None,
5263  internal::None, internal::None, internal::None, internal::None,
5264  internal::None, internal::None, internal::None>
5265 {
5266  typedef internal::Types31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5267  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5268  T27, T28, T29, T30, T31> type;
5269 };
5270 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5271  typename T6, typename T7, typename T8, typename T9, typename T10,
5272  typename T11, typename T12, typename T13, typename T14, typename T15,
5273  typename T16, typename T17, typename T18, typename T19, typename T20,
5274  typename T21, typename T22, typename T23, typename T24, typename T25,
5275  typename T26, typename T27, typename T28, typename T29, typename T30,
5276  typename T31, typename T32>
5277 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5278  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5279  T31, T32, internal::None, internal::None, internal::None, internal::None,
5280  internal::None, internal::None, internal::None, internal::None,
5281  internal::None, internal::None, internal::None, internal::None,
5282  internal::None, internal::None, internal::None, internal::None,
5283  internal::None, internal::None>
5284 {
5285  typedef internal::Types32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5286  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5287  T27, T28, T29, T30, T31, T32> type;
5288 };
5289 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5290  typename T6, typename T7, typename T8, typename T9, typename T10,
5291  typename T11, typename T12, typename T13, typename T14, typename T15,
5292  typename T16, typename T17, typename T18, typename T19, typename T20,
5293  typename T21, typename T22, typename T23, typename T24, typename T25,
5294  typename T26, typename T27, typename T28, typename T29, typename T30,
5295  typename T31, typename T32, typename T33>
5296 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5297  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5298  T31, T32, T33, internal::None, internal::None, internal::None,
5299  internal::None, internal::None, internal::None, internal::None,
5300  internal::None, internal::None, internal::None, internal::None,
5301  internal::None, internal::None, internal::None, internal::None,
5302  internal::None, internal::None>
5303 {
5304  typedef internal::Types33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5305  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5306  T27, T28, T29, T30, T31, T32, T33> type;
5307 };
5308 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5309  typename T6, typename T7, typename T8, typename T9, typename T10,
5310  typename T11, typename T12, typename T13, typename T14, typename T15,
5311  typename T16, typename T17, typename T18, typename T19, typename T20,
5312  typename T21, typename T22, typename T23, typename T24, typename T25,
5313  typename T26, typename T27, typename T28, typename T29, typename T30,
5314  typename T31, typename T32, typename T33, typename T34>
5315 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5316  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5317  T31, T32, T33, T34, internal::None, internal::None, internal::None,
5318  internal::None, internal::None, internal::None, internal::None,
5319  internal::None, internal::None, internal::None, internal::None,
5320  internal::None, internal::None, internal::None, internal::None,
5321  internal::None>
5322 {
5323  typedef internal::Types34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5324  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5325  T27, T28, T29, T30, T31, T32, T33, T34> type;
5326 };
5327 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5328  typename T6, typename T7, typename T8, typename T9, typename T10,
5329  typename T11, typename T12, typename T13, typename T14, typename T15,
5330  typename T16, typename T17, typename T18, typename T19, typename T20,
5331  typename T21, typename T22, typename T23, typename T24, typename T25,
5332  typename T26, typename T27, typename T28, typename T29, typename T30,
5333  typename T31, typename T32, typename T33, typename T34, typename T35>
5334 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5335  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5336  T31, T32, T33, T34, T35, internal::None, internal::None, internal::None,
5337  internal::None, internal::None, internal::None, internal::None,
5338  internal::None, internal::None, internal::None, internal::None,
5339  internal::None, internal::None, internal::None, internal::None>
5340 {
5341  typedef internal::Types35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5342  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5343  T27, T28, T29, T30, T31, T32, T33, T34, T35> type;
5344 };
5345 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5346  typename T6, typename T7, typename T8, typename T9, typename T10,
5347  typename T11, typename T12, typename T13, typename T14, typename T15,
5348  typename T16, typename T17, typename T18, typename T19, typename T20,
5349  typename T21, typename T22, typename T23, typename T24, typename T25,
5350  typename T26, typename T27, typename T28, typename T29, typename T30,
5351  typename T31, typename T32, typename T33, typename T34, typename T35,
5352  typename T36>
5353 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5354  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5355  T31, T32, T33, T34, T35, T36, internal::None, internal::None,
5356  internal::None, internal::None, internal::None, internal::None,
5357  internal::None, internal::None, internal::None, internal::None,
5358  internal::None, internal::None, internal::None, internal::None>
5359 {
5360  typedef internal::Types36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5361  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5362  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
5363 };
5364 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5365  typename T6, typename T7, typename T8, typename T9, typename T10,
5366  typename T11, typename T12, typename T13, typename T14, typename T15,
5367  typename T16, typename T17, typename T18, typename T19, typename T20,
5368  typename T21, typename T22, typename T23, typename T24, typename T25,
5369  typename T26, typename T27, typename T28, typename T29, typename T30,
5370  typename T31, typename T32, typename T33, typename T34, typename T35,
5371  typename T36, typename T37>
5372 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5373  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5374  T31, T32, T33, T34, T35, T36, T37, internal::None, internal::None,
5375  internal::None, internal::None, internal::None, internal::None,
5376  internal::None, internal::None, internal::None, internal::None,
5377  internal::None, internal::None, internal::None>
5378 {
5379  typedef internal::Types37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5380  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5381  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
5382 };
5383 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5384  typename T6, typename T7, typename T8, typename T9, typename T10,
5385  typename T11, typename T12, typename T13, typename T14, typename T15,
5386  typename T16, typename T17, typename T18, typename T19, typename T20,
5387  typename T21, typename T22, typename T23, typename T24, typename T25,
5388  typename T26, typename T27, typename T28, typename T29, typename T30,
5389  typename T31, typename T32, typename T33, typename T34, typename T35,
5390  typename T36, typename T37, typename T38>
5391 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5392  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5393  T31, T32, T33, T34, T35, T36, T37, T38, internal::None, internal::None,
5394  internal::None, internal::None, internal::None, internal::None,
5395  internal::None, internal::None, internal::None, internal::None,
5396  internal::None, internal::None>
5397 {
5398  typedef internal::Types38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5399  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5400  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
5401 };
5402 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5403  typename T6, typename T7, typename T8, typename T9, typename T10,
5404  typename T11, typename T12, typename T13, typename T14, typename T15,
5405  typename T16, typename T17, typename T18, typename T19, typename T20,
5406  typename T21, typename T22, typename T23, typename T24, typename T25,
5407  typename T26, typename T27, typename T28, typename T29, typename T30,
5408  typename T31, typename T32, typename T33, typename T34, typename T35,
5409  typename T36, typename T37, typename T38, typename T39>
5410 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5411  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5412  T31, T32, T33, T34, T35, T36, T37, T38, T39, internal::None,
5413  internal::None, internal::None, internal::None, internal::None,
5414  internal::None, internal::None, internal::None, internal::None,
5415  internal::None, internal::None>
5416 {
5417  typedef internal::Types39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5418  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5419  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
5420 };
5421 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5422  typename T6, typename T7, typename T8, typename T9, typename T10,
5423  typename T11, typename T12, typename T13, typename T14, typename T15,
5424  typename T16, typename T17, typename T18, typename T19, typename T20,
5425  typename T21, typename T22, typename T23, typename T24, typename T25,
5426  typename T26, typename T27, typename T28, typename T29, typename T30,
5427  typename T31, typename T32, typename T33, typename T34, typename T35,
5428  typename T36, typename T37, typename T38, typename T39, typename T40>
5429 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5430  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5431  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, internal::None,
5432  internal::None, internal::None, internal::None, internal::None,
5433  internal::None, internal::None, internal::None, internal::None,
5434  internal::None>
5435 {
5436  typedef internal::Types40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5437  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5438  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
5439  T40> type;
5440 };
5441 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5442  typename T6, typename T7, typename T8, typename T9, typename T10,
5443  typename T11, typename T12, typename T13, typename T14, typename T15,
5444  typename T16, typename T17, typename T18, typename T19, typename T20,
5445  typename T21, typename T22, typename T23, typename T24, typename T25,
5446  typename T26, typename T27, typename T28, typename T29, typename T30,
5447  typename T31, typename T32, typename T33, typename T34, typename T35,
5448  typename T36, typename T37, typename T38, typename T39, typename T40,
5449  typename T41>
5450 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5451  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5452  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, internal::None,
5453  internal::None, internal::None, internal::None, internal::None,
5454  internal::None, internal::None, internal::None, internal::None>
5455 {
5456  typedef internal::Types41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5457  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5458  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5459  T41> type;
5460 };
5461 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5462  typename T6, typename T7, typename T8, typename T9, typename T10,
5463  typename T11, typename T12, typename T13, typename T14, typename T15,
5464  typename T16, typename T17, typename T18, typename T19, typename T20,
5465  typename T21, typename T22, typename T23, typename T24, typename T25,
5466  typename T26, typename T27, typename T28, typename T29, typename T30,
5467  typename T31, typename T32, typename T33, typename T34, typename T35,
5468  typename T36, typename T37, typename T38, typename T39, typename T40,
5469  typename T41, typename T42>
5470 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5471  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5472  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, internal::None,
5473  internal::None, internal::None, internal::None, internal::None,
5474  internal::None, internal::None, internal::None>
5475 {
5476  typedef internal::Types42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5477  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5478  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5479  T41, T42> type;
5480 };
5481 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5482  typename T6, typename T7, typename T8, typename T9, typename T10,
5483  typename T11, typename T12, typename T13, typename T14, typename T15,
5484  typename T16, typename T17, typename T18, typename T19, typename T20,
5485  typename T21, typename T22, typename T23, typename T24, typename T25,
5486  typename T26, typename T27, typename T28, typename T29, typename T30,
5487  typename T31, typename T32, typename T33, typename T34, typename T35,
5488  typename T36, typename T37, typename T38, typename T39, typename T40,
5489  typename T41, typename T42, typename T43>
5490 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5491  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5492  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
5493  internal::None, internal::None, internal::None, internal::None,
5494  internal::None, internal::None, internal::None>
5495 {
5496  typedef internal::Types43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5497  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5498  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5499  T41, T42, T43> type;
5500 };
5501 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5502  typename T6, typename T7, typename T8, typename T9, typename T10,
5503  typename T11, typename T12, typename T13, typename T14, typename T15,
5504  typename T16, typename T17, typename T18, typename T19, typename T20,
5505  typename T21, typename T22, typename T23, typename T24, typename T25,
5506  typename T26, typename T27, typename T28, typename T29, typename T30,
5507  typename T31, typename T32, typename T33, typename T34, typename T35,
5508  typename T36, typename T37, typename T38, typename T39, typename T40,
5509  typename T41, typename T42, typename T43, typename T44>
5510 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5511  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5512  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
5513  internal::None, internal::None, internal::None, internal::None,
5514  internal::None, internal::None>
5515 {
5516  typedef internal::Types44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5517  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5518  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5519  T41, T42, T43, T44> type;
5520 };
5521 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5522  typename T6, typename T7, typename T8, typename T9, typename T10,
5523  typename T11, typename T12, typename T13, typename T14, typename T15,
5524  typename T16, typename T17, typename T18, typename T19, typename T20,
5525  typename T21, typename T22, typename T23, typename T24, typename T25,
5526  typename T26, typename T27, typename T28, typename T29, typename T30,
5527  typename T31, typename T32, typename T33, typename T34, typename T35,
5528  typename T36, typename T37, typename T38, typename T39, typename T40,
5529  typename T41, typename T42, typename T43, typename T44, typename T45>
5530 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5531  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5532  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
5533  internal::None, internal::None, internal::None, internal::None,
5534  internal::None>
5535 {
5536  typedef internal::Types45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5537  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5538  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5539  T41, T42, T43, T44, T45> type;
5540 };
5541 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5542  typename T6, typename T7, typename T8, typename T9, typename T10,
5543  typename T11, typename T12, typename T13, typename T14, typename T15,
5544  typename T16, typename T17, typename T18, typename T19, typename T20,
5545  typename T21, typename T22, typename T23, typename T24, typename T25,
5546  typename T26, typename T27, typename T28, typename T29, typename T30,
5547  typename T31, typename T32, typename T33, typename T34, typename T35,
5548  typename T36, typename T37, typename T38, typename T39, typename T40,
5549  typename T41, typename T42, typename T43, typename T44, typename T45,
5550  typename T46>
5551 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5552  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5553  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
5554  T46, internal::None, internal::None, internal::None, internal::None>
5555 {
5556  typedef internal::Types46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5557  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5558  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5559  T41, T42, T43, T44, T45, T46> type;
5560 };
5561 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5562  typename T6, typename T7, typename T8, typename T9, typename T10,
5563  typename T11, typename T12, typename T13, typename T14, typename T15,
5564  typename T16, typename T17, typename T18, typename T19, typename T20,
5565  typename T21, typename T22, typename T23, typename T24, typename T25,
5566  typename T26, typename T27, typename T28, typename T29, typename T30,
5567  typename T31, typename T32, typename T33, typename T34, typename T35,
5568  typename T36, typename T37, typename T38, typename T39, typename T40,
5569  typename T41, typename T42, typename T43, typename T44, typename T45,
5570  typename T46, typename T47>
5571 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5572  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5573  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
5574  T46, T47, internal::None, internal::None, internal::None>
5575 {
5576  typedef internal::Types47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5577  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5578  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5579  T41, T42, T43, T44, T45, T46, T47> type;
5580 };
5581 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5582  typename T6, typename T7, typename T8, typename T9, typename T10,
5583  typename T11, typename T12, typename T13, typename T14, typename T15,
5584  typename T16, typename T17, typename T18, typename T19, typename T20,
5585  typename T21, typename T22, typename T23, typename T24, typename T25,
5586  typename T26, typename T27, typename T28, typename T29, typename T30,
5587  typename T31, typename T32, typename T33, typename T34, typename T35,
5588  typename T36, typename T37, typename T38, typename T39, typename T40,
5589  typename T41, typename T42, typename T43, typename T44, typename T45,
5590  typename T46, typename T47, typename T48>
5591 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5592  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5593  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
5594  T46, T47, T48, internal::None, internal::None>
5595 {
5596  typedef internal::Types48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5597  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5598  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5599  T41, T42, T43, T44, T45, T46, T47, T48> type;
5600 };
5601 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5602  typename T6, typename T7, typename T8, typename T9, typename T10,
5603  typename T11, typename T12, typename T13, typename T14, typename T15,
5604  typename T16, typename T17, typename T18, typename T19, typename T20,
5605  typename T21, typename T22, typename T23, typename T24, typename T25,
5606  typename T26, typename T27, typename T28, typename T29, typename T30,
5607  typename T31, typename T32, typename T33, typename T34, typename T35,
5608  typename T36, typename T37, typename T38, typename T39, typename T40,
5609  typename T41, typename T42, typename T43, typename T44, typename T45,
5610  typename T46, typename T47, typename T48, typename T49>
5611 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5612  T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5613  T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
5614  T46, T47, T48, T49, internal::None>
5615 {
5616  typedef internal::Types49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5617  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5618  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5619  T41, T42, T43, T44, T45, T46, T47, T48, T49> type;
5620 };
5621 
5622 namespace internal
5623 {
5624 
5625 # define GTEST_TEMPLATE_ template <typename T> class
5626 
5627 // The template "selector" struct TemplateSel<Tmpl> is used to
5628 // represent Tmpl, which must be a class template with one type
5629 // parameter, as a type. TemplateSel<Tmpl>::Bind<T>::type is defined
5630 // as the type Tmpl<T>. This allows us to actually instantiate the
5631 // template "selected" by TemplateSel<Tmpl>.
5632 //
5633 // This trick is necessary for simulating typedef for class templates,
5634 // which C++ doesn't support directly.
5635 template <GTEST_TEMPLATE_ Tmpl>
5636 struct TemplateSel
5637 {
5638  template <typename T>
5639  struct Bind
5640  {
5641  typedef Tmpl<T> type;
5642  };
5643 };
5644 
5645 # define GTEST_BIND_(TmplSel, T) \
5646  TmplSel::template Bind<T>::type
5647 
5648 // A unique struct template used as the default value for the
5649 // arguments of class template Templates. This allows us to simulate
5650 // variadic templates (e.g. Templates<int>, Templates<int, double>,
5651 // and etc), which C++ doesn't support directly.
5652 template <typename T>
5653 struct NoneT {};
5654 
5655 // The following family of struct and struct templates are used to
5656 // represent template lists. In particular, TemplatesN<T1, T2, ...,
5657 // TN> represents a list of N templates (T1, T2, ..., and TN). Except
5658 // for Templates0, every struct in the family has two member types:
5659 // Head for the selector of the first template in the list, and Tail
5660 // for the rest of the list.
5661 
5662 // The empty template list.
5663 struct Templates0 {};
5664 
5665 // Template lists of length 1, 2, 3, and so on.
5666 
5667 template <GTEST_TEMPLATE_ T1>
5668 struct Templates1
5669 {
5670  typedef TemplateSel<T1> Head;
5671  typedef Templates0 Tail;
5672 };
5673 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
5674 struct Templates2
5675 {
5676  typedef TemplateSel<T1> Head;
5677  typedef Templates1<T2> Tail;
5678 };
5679 
5680 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
5681 struct Templates3
5682 {
5683  typedef TemplateSel<T1> Head;
5684  typedef Templates2<T2, T3> Tail;
5685 };
5686 
5687 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5688  GTEST_TEMPLATE_ T4>
5689 struct Templates4
5690 {
5691  typedef TemplateSel<T1> Head;
5692  typedef Templates3<T2, T3, T4> Tail;
5693 };
5694 
5695 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5696  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
5697 struct Templates5
5698 {
5699  typedef TemplateSel<T1> Head;
5700  typedef Templates4<T2, T3, T4, T5> Tail;
5701 };
5702 
5703 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5704  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
5705 struct Templates6
5706 {
5707  typedef TemplateSel<T1> Head;
5708  typedef Templates5<T2, T3, T4, T5, T6> Tail;
5709 };
5710 
5711 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5712  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5713  GTEST_TEMPLATE_ T7>
5714 struct Templates7
5715 {
5716  typedef TemplateSel<T1> Head;
5717  typedef Templates6<T2, T3, T4, T5, T6, T7> Tail;
5718 };
5719 
5720 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5721  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5722  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
5723 struct Templates8
5724 {
5725  typedef TemplateSel<T1> Head;
5726  typedef Templates7<T2, T3, T4, T5, T6, T7, T8> Tail;
5727 };
5728 
5729 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5730  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5731  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
5732 struct Templates9
5733 {
5734  typedef TemplateSel<T1> Head;
5735  typedef Templates8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
5736 };
5737 
5738 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5739  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5740  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5741  GTEST_TEMPLATE_ T10>
5742 struct Templates10
5743 {
5744  typedef TemplateSel<T1> Head;
5745  typedef Templates9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
5746 };
5747 
5748 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5749  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5750  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5751  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
5752 struct Templates11
5753 {
5754  typedef TemplateSel<T1> Head;
5755  typedef Templates10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
5756 };
5757 
5758 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5759  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5760  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5761  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
5762 struct Templates12
5763 {
5764  typedef TemplateSel<T1> Head;
5765  typedef Templates11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
5766 };
5767 
5768 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5769  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5770  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5771  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5772  GTEST_TEMPLATE_ T13>
5773 struct Templates13
5774 {
5775  typedef TemplateSel<T1> Head;
5776  typedef Templates12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
5777 };
5778 
5779 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5780  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5781  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5782  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5783  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
5784 struct Templates14
5785 {
5786  typedef TemplateSel<T1> Head;
5787  typedef Templates13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
5788  T14> Tail;
5789 };
5790 
5791 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5792  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5793  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5794  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5795  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
5796 struct Templates15
5797 {
5798  typedef TemplateSel<T1> Head;
5799  typedef Templates14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5800  T15> Tail;
5801 };
5802 
5803 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5804  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5805  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5806  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5807  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5808  GTEST_TEMPLATE_ T16>
5809 struct Templates16
5810 {
5811  typedef TemplateSel<T1> Head;
5812  typedef Templates15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5813  T15, T16> Tail;
5814 };
5815 
5816 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5817  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5818  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5819  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5820  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5821  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
5822 struct Templates17
5823 {
5824  typedef TemplateSel<T1> Head;
5825  typedef Templates16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5826  T15, T16, T17> Tail;
5827 };
5828 
5829 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5830  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5831  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5832  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5833  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5834  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
5835 struct Templates18
5836 {
5837  typedef TemplateSel<T1> Head;
5838  typedef Templates17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5839  T15, T16, T17, T18> Tail;
5840 };
5841 
5842 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5843  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5844  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5845  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5846  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5847  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5848  GTEST_TEMPLATE_ T19>
5849 struct Templates19
5850 {
5851  typedef TemplateSel<T1> Head;
5852  typedef Templates18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5853  T15, T16, T17, T18, T19> Tail;
5854 };
5855 
5856 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5857  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5858  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5859  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5860  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5861  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5862  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
5863 struct Templates20
5864 {
5865  typedef TemplateSel<T1> Head;
5866  typedef Templates19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5867  T15, T16, T17, T18, T19, T20> Tail;
5868 };
5869 
5870 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5871  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5872  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5873  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5874  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5875  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5876  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
5877 struct Templates21
5878 {
5879  typedef TemplateSel<T1> Head;
5880  typedef Templates20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5881  T15, T16, T17, T18, T19, T20, T21> Tail;
5882 };
5883 
5884 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5885  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5886  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5887  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5888  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5889  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5890  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5891  GTEST_TEMPLATE_ T22>
5892 struct Templates22
5893 {
5894  typedef TemplateSel<T1> Head;
5895  typedef Templates21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5896  T15, T16, T17, T18, T19, T20, T21, T22> Tail;
5897 };
5898 
5899 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5900  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5901  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5902  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5903  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5904  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5905  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5906  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
5907 struct Templates23
5908 {
5909  typedef TemplateSel<T1> Head;
5910  typedef Templates22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5911  T15, T16, T17, T18, T19, T20, T21, T22, T23> Tail;
5912 };
5913 
5914 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5915  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5916  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5917  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5918  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5919  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5920  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5921  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
5922 struct Templates24
5923 {
5924  typedef TemplateSel<T1> Head;
5925  typedef Templates23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5926  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
5927 };
5928 
5929 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5930  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5931  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5932  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5933  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5934  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5935  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5936  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5937  GTEST_TEMPLATE_ T25>
5938 struct Templates25
5939 {
5940  typedef TemplateSel<T1> Head;
5941  typedef Templates24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5942  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
5943 };
5944 
5945 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5946  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5947  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5948  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5949  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5950  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5951  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5952  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5953  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
5954 struct Templates26
5955 {
5956  typedef TemplateSel<T1> Head;
5957  typedef Templates25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5958  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
5959 };
5960 
5961 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5962  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5963  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5964  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5965  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5966  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5967  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5968  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5969  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
5970 struct Templates27
5971 {
5972  typedef TemplateSel<T1> Head;
5973  typedef Templates26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5974  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
5975 };
5976 
5977 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5978  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5979  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5980  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5981  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5982  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5983  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5984  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5985  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5986  GTEST_TEMPLATE_ T28>
5987 struct Templates28
5988 {
5989  typedef TemplateSel<T1> Head;
5990  typedef Templates27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5991  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
5992  T28> Tail;
5993 };
5994 
5995 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5996  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5997  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5998  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5999  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6000  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6001  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6002  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6003  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6004  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
6005 struct Templates29
6006 {
6007  typedef TemplateSel<T1> Head;
6008  typedef Templates28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6009  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6010  T29> Tail;
6011 };
6012 
6013 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6014  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6015  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6016  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6017  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6018  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6019  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6020  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6021  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6022  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
6023 struct Templates30
6024 {
6025  typedef TemplateSel<T1> Head;
6026  typedef Templates29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6027  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6028  T29, T30> Tail;
6029 };
6030 
6031 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6032  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6033  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6034  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6035  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6036  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6037  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6038  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6039  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6040  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6041  GTEST_TEMPLATE_ T31>
6042 struct Templates31
6043 {
6044  typedef TemplateSel<T1> Head;
6045  typedef Templates30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6046  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6047  T29, T30, T31> Tail;
6048 };
6049 
6050 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6051  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6052  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6053  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6054  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6055  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6056  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6057  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6058  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6059  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6060  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
6061 struct Templates32
6062 {
6063  typedef TemplateSel<T1> Head;
6064  typedef Templates31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6065  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6066  T29, T30, T31, T32> Tail;
6067 };
6068 
6069 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6070  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6071  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6072  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6073  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6074  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6075  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6076  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6077  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6078  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6079  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
6080 struct Templates33
6081 {
6082  typedef TemplateSel<T1> Head;
6083  typedef Templates32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6084  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6085  T29, T30, T31, T32, T33> Tail;
6086 };
6087 
6088 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6089  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6090  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6091  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6092  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6093  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6094  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6095  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6096  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6097  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6098  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6099  GTEST_TEMPLATE_ T34>
6100 struct Templates34
6101 {
6102  typedef TemplateSel<T1> Head;
6103  typedef Templates33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6104  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6105  T29, T30, T31, T32, T33, T34> Tail;
6106 };
6107 
6108 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6109  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6110  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6111  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6112  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6113  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6114  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6115  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6116  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6117  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6118  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6119  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
6120 struct Templates35
6121 {
6122  typedef TemplateSel<T1> Head;
6123  typedef Templates34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6124  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6125  T29, T30, T31, T32, T33, T34, T35> Tail;
6126 };
6127 
6128 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6129  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6130  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6131  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6132  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6133  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6134  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6135  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6136  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6137  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6138  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6139  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
6140 struct Templates36
6141 {
6142  typedef TemplateSel<T1> Head;
6143  typedef Templates35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6144  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6145  T29, T30, T31, T32, T33, T34, T35, T36> Tail;
6146 };
6147 
6148 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6149  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6150  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6151  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6152  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6153  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6154  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6155  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6156  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6157  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6158  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6159  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6160  GTEST_TEMPLATE_ T37>
6161 struct Templates37
6162 {
6163  typedef TemplateSel<T1> Head;
6164  typedef Templates36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6165  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6166  T29, T30, T31, T32, T33, T34, T35, T36, T37> Tail;
6167 };
6168 
6169 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6170  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6171  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6172  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6173  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6174  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6175  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6176  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6177  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6178  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6179  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6180  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6181  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
6182 struct Templates38
6183 {
6184  typedef TemplateSel<T1> Head;
6185  typedef Templates37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6186  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6187  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
6188 };
6189 
6190 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6191  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6192  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6193  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6194  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6195  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6196  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6197  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6198  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6199  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6200  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6201  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6202  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
6203 struct Templates39
6204 {
6205  typedef TemplateSel<T1> Head;
6206  typedef Templates38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6207  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6208  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
6209 };
6210 
6211 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6212  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6213  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6214  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6215  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6216  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6217  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6218  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6219  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6220  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6221  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6222  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6223  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6224  GTEST_TEMPLATE_ T40>
6225 struct Templates40
6226 {
6227  typedef TemplateSel<T1> Head;
6228  typedef Templates39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6229  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6230  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
6231 };
6232 
6233 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6234  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6235  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6236  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6237  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6238  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6239  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6240  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6241  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6242  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6243  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6244  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6245  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6246  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
6247 struct Templates41
6248 {
6249  typedef TemplateSel<T1> Head;
6250  typedef Templates40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6251  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6252  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
6253 };
6254 
6255 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6256  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6257  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6258  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6259  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6260  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6261  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6262  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6263  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6264  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6265  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6266  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6267  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6268  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
6269 struct Templates42
6270 {
6271  typedef TemplateSel<T1> Head;
6272  typedef Templates41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6273  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6274  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6275  T42> Tail;
6276 };
6277 
6278 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6279  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6280  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6281  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6282  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6283  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6284  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6285  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6286  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6287  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6288  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6289  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6290  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6291  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6292  GTEST_TEMPLATE_ T43>
6293 struct Templates43
6294 {
6295  typedef TemplateSel<T1> Head;
6296  typedef Templates42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6297  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6298  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
6299  T43> Tail;
6300 };
6301 
6302 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6303  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6304  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6305  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6306  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6307  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6308  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6309  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6310  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6311  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6312  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6313  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6314  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6315  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6316  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
6317 struct Templates44
6318 {
6319  typedef TemplateSel<T1> Head;
6320  typedef Templates43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6321  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6322  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
6323  T43, T44> Tail;
6324 };
6325 
6326 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6327  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6328  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6329  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6330  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6331  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6332  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6333  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6334  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6335  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6336  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6337  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6338  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6339  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6340  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
6341 struct Templates45
6342 {
6343  typedef TemplateSel<T1> Head;
6344  typedef Templates44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6345  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6346  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
6347  T43, T44, T45> Tail;
6348 };
6349 
6350 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6351  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6352  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6353  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6354  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6355  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6356  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6357  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6358  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6359  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6360  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6361  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6362  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6363  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6364  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
6365  GTEST_TEMPLATE_ T46>
6366 struct Templates46
6367 {
6368  typedef TemplateSel<T1> Head;
6369  typedef Templates45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6370  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6371  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
6372  T43, T44, T45, T46> Tail;
6373 };
6374 
6375 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6376  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6377  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6378  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6379  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6380  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6381  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6382  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6383  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6384  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6385  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6386  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6387  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6388  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6389  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
6390  GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
6391 struct Templates47
6392 {
6393  typedef TemplateSel<T1> Head;
6394  typedef Templates46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6395  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6396  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
6397  T43, T44, T45, T46, T47> Tail;
6398 };
6399 
6400 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6401  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6402  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6403  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6404  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6405  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6406  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6407  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6408  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6409  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6410  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6411  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6412  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6413  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6414  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
6415  GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
6416 struct Templates48
6417 {
6418  typedef TemplateSel<T1> Head;
6419  typedef Templates47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6420  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6421  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
6422  T43, T44, T45, T46, T47, T48> Tail;
6423 };
6424 
6425 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6426  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6427  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6428  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6429  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6430  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6431  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6432  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6433  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6434  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6435  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6436  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6437  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6438  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6439  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
6440  GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
6441  GTEST_TEMPLATE_ T49>
6442 struct Templates49
6443 {
6444  typedef TemplateSel<T1> Head;
6445  typedef Templates48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6446  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6447  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
6448  T43, T44, T45, T46, T47, T48, T49> Tail;
6449 };
6450 
6451 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6452  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6453  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6454  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6455  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6456  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6457  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6458  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6459  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6460  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6461  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6462  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6463  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6464  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6465  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
6466  GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
6467  GTEST_TEMPLATE_ T49, GTEST_TEMPLATE_ T50>
6468 struct Templates50
6469 {
6470  typedef TemplateSel<T1> Head;
6471  typedef Templates49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6472  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6473  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
6474  T43, T44, T45, T46, T47, T48, T49, T50> Tail;
6475 };
6476 
6477 
6478 // We don't want to require the users to write TemplatesN<...> directly,
6479 // as that would require them to count the length. Templates<...> is much
6480 // easier to write, but generates horrible messages when there is a
6481 // compiler error, as gcc insists on printing out each template
6482 // argument, even if it has the default value (this means Templates<list>
6483 // will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler
6484 // errors).
6485 //
6486 // Our solution is to combine the best part of the two approaches: a
6487 // user would write Templates<T1, ..., TN>, and Google Test will translate
6488 // that to TemplatesN<T1, ..., TN> internally to make error messages
6489 // readable. The translation is done by the 'type' member of the
6490 // Templates template.
6491 template <GTEST_TEMPLATE_ T1 = NoneT, GTEST_TEMPLATE_ T2 = NoneT,
6492  GTEST_TEMPLATE_ T3 = NoneT, GTEST_TEMPLATE_ T4 = NoneT,
6493  GTEST_TEMPLATE_ T5 = NoneT, GTEST_TEMPLATE_ T6 = NoneT,
6494  GTEST_TEMPLATE_ T7 = NoneT, GTEST_TEMPLATE_ T8 = NoneT,
6495  GTEST_TEMPLATE_ T9 = NoneT, GTEST_TEMPLATE_ T10 = NoneT,
6496  GTEST_TEMPLATE_ T11 = NoneT, GTEST_TEMPLATE_ T12 = NoneT,
6497  GTEST_TEMPLATE_ T13 = NoneT, GTEST_TEMPLATE_ T14 = NoneT,
6498  GTEST_TEMPLATE_ T15 = NoneT, GTEST_TEMPLATE_ T16 = NoneT,
6499  GTEST_TEMPLATE_ T17 = NoneT, GTEST_TEMPLATE_ T18 = NoneT,
6500  GTEST_TEMPLATE_ T19 = NoneT, GTEST_TEMPLATE_ T20 = NoneT,
6501  GTEST_TEMPLATE_ T21 = NoneT, GTEST_TEMPLATE_ T22 = NoneT,
6502  GTEST_TEMPLATE_ T23 = NoneT, GTEST_TEMPLATE_ T24 = NoneT,
6503  GTEST_TEMPLATE_ T25 = NoneT, GTEST_TEMPLATE_ T26 = NoneT,
6504  GTEST_TEMPLATE_ T27 = NoneT, GTEST_TEMPLATE_ T28 = NoneT,
6505  GTEST_TEMPLATE_ T29 = NoneT, GTEST_TEMPLATE_ T30 = NoneT,
6506  GTEST_TEMPLATE_ T31 = NoneT, GTEST_TEMPLATE_ T32 = NoneT,
6507  GTEST_TEMPLATE_ T33 = NoneT, GTEST_TEMPLATE_ T34 = NoneT,
6508  GTEST_TEMPLATE_ T35 = NoneT, GTEST_TEMPLATE_ T36 = NoneT,
6509  GTEST_TEMPLATE_ T37 = NoneT, GTEST_TEMPLATE_ T38 = NoneT,
6510  GTEST_TEMPLATE_ T39 = NoneT, GTEST_TEMPLATE_ T40 = NoneT,
6511  GTEST_TEMPLATE_ T41 = NoneT, GTEST_TEMPLATE_ T42 = NoneT,
6512  GTEST_TEMPLATE_ T43 = NoneT, GTEST_TEMPLATE_ T44 = NoneT,
6513  GTEST_TEMPLATE_ T45 = NoneT, GTEST_TEMPLATE_ T46 = NoneT,
6514  GTEST_TEMPLATE_ T47 = NoneT, GTEST_TEMPLATE_ T48 = NoneT,
6515  GTEST_TEMPLATE_ T49 = NoneT, GTEST_TEMPLATE_ T50 = NoneT>
6516 struct Templates
6517 {
6518  typedef Templates50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6519  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6520  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6521  T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
6522 };
6523 
6524 template <>
6525 struct Templates<NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6526  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6527  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6528  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6529  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6530  NoneT>
6531 {
6532  typedef Templates0 type;
6533 };
6534 template <GTEST_TEMPLATE_ T1>
6535 struct Templates<T1, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6536  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6537  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6538  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6539  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6540  NoneT>
6541 {
6542  typedef Templates1<T1> type;
6543 };
6544 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
6545 struct Templates<T1, T2, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6546  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6547  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6548  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6549  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6550  NoneT>
6551 {
6552  typedef Templates2<T1, T2> type;
6553 };
6554 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
6555 struct Templates<T1, T2, T3, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6556  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6557  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6558  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6559  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6560 {
6561  typedef Templates3<T1, T2, T3> type;
6562 };
6563 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6564  GTEST_TEMPLATE_ T4>
6565 struct Templates<T1, T2, T3, T4, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6566  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6567  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6568  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6569  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6570 {
6571  typedef Templates4<T1, T2, T3, T4> type;
6572 };
6573 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6574  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
6575 struct Templates<T1, T2, T3, T4, T5, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6576  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6577  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6578  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6579  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6580 {
6581  typedef Templates5<T1, T2, T3, T4, T5> type;
6582 };
6583 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6584  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
6585 struct Templates<T1, T2, T3, T4, T5, T6, NoneT, NoneT, NoneT, NoneT, NoneT,
6586  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6587  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6588  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6589  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6590 {
6591  typedef Templates6<T1, T2, T3, T4, T5, T6> type;
6592 };
6593 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6594  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6595  GTEST_TEMPLATE_ T7>
6596 struct Templates<T1, T2, T3, T4, T5, T6, T7, NoneT, NoneT, NoneT, NoneT, NoneT,
6597  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6598  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6599  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6600  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6601 {
6602  typedef Templates7<T1, T2, T3, T4, T5, T6, T7> type;
6603 };
6604 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6605  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6606  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
6607 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, NoneT, NoneT, NoneT, NoneT,
6608  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6609  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6610  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6611  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6612 {
6613  typedef Templates8<T1, T2, T3, T4, T5, T6, T7, T8> type;
6614 };
6615 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6616  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6617  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
6618 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, NoneT, NoneT, NoneT,
6619  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6620  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6621  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6622  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6623 {
6624  typedef Templates9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
6625 };
6626 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6627  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6628  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6629  GTEST_TEMPLATE_ T10>
6630 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, NoneT, NoneT, NoneT,
6631  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6632  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6633  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6634  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6635 {
6636  typedef Templates10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
6637 };
6638 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6639  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6640  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6641  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
6642 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, NoneT, NoneT,
6643  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6644  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6645  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6646  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6647 {
6648  typedef Templates11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
6649 };
6650 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6651  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6652  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6653  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
6654 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, NoneT,
6655  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6656  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6657  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6658  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6659 {
6660  typedef Templates12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> type;
6661 };
6662 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6663  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6664  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6665  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6666  GTEST_TEMPLATE_ T13>
6667 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, NoneT,
6668  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6669  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6670  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6671  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6672 {
6673  typedef Templates13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
6674  T13> type;
6675 };
6676 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6677  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6678  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6679  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6680  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
6681 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6682  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6683  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6684  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6685  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6686 {
6687  typedef Templates14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6688  T14> type;
6689 };
6690 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6691  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6692  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6693  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6694  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
6695 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6696  T15, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6697  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6698  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6699  NoneT, NoneT, NoneT, NoneT, NoneT>
6700 {
6701  typedef Templates15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6702  T14, T15> type;
6703 };
6704 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6705  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6706  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6707  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6708  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6709  GTEST_TEMPLATE_ T16>
6710 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6711  T15, T16, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6712  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6713  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6714  NoneT, NoneT, NoneT, NoneT, NoneT>
6715 {
6716  typedef Templates16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6717  T14, T15, T16> type;
6718 };
6719 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6720  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6721  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6722  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6723  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6724  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
6725 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6726  T15, T16, T17, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6727  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6728  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6729  NoneT, NoneT, NoneT, NoneT, NoneT>
6730 {
6731  typedef Templates17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6732  T14, T15, T16, T17> type;
6733 };
6734 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6735  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6736  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6737  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6738  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6739  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
6740 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6741  T15, T16, T17, T18, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6742  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6743  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6744  NoneT, NoneT, NoneT, NoneT>
6745 {
6746  typedef Templates18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6747  T14, T15, T16, T17, T18> type;
6748 };
6749 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6750  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6751  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6752  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6753  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6754  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6755  GTEST_TEMPLATE_ T19>
6756 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6757  T15, T16, T17, T18, T19, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6758  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6759  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6760  NoneT, NoneT, NoneT, NoneT>
6761 {
6762  typedef Templates19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6763  T14, T15, T16, T17, T18, T19> type;
6764 };
6765 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6766  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6767  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6768  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6769  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6770  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6771  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
6772 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6773  T15, T16, T17, T18, T19, T20, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6774  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6775  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6776  NoneT, NoneT, NoneT, NoneT>
6777 {
6778  typedef Templates20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6779  T14, T15, T16, T17, T18, T19, T20> type;
6780 };
6781 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6782  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6783  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6784  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6785  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6786  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6787  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
6788 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6789  T15, T16, T17, T18, T19, T20, T21, NoneT, NoneT, NoneT, NoneT, NoneT,
6790  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6791  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6792  NoneT, NoneT, NoneT, NoneT>
6793 {
6794  typedef Templates21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6795  T14, T15, T16, T17, T18, T19, T20, T21> type;
6796 };
6797 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6798  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6799  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6800  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6801  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6802  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6803  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6804  GTEST_TEMPLATE_ T22>
6805 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6806  T15, T16, T17, T18, T19, T20, T21, T22, NoneT, NoneT, NoneT, NoneT, NoneT,
6807  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6808  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6809  NoneT, NoneT, NoneT>
6810 {
6811  typedef Templates22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6812  T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
6813 };
6814 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6815  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6816  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6817  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6818  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6819  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6820  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6821  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
6822 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6823  T15, T16, T17, T18, T19, T20, T21, T22, T23, NoneT, NoneT, NoneT, NoneT,
6824  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6825  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6826  NoneT, NoneT, NoneT>
6827 {
6828  typedef Templates23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6829  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
6830 };
6831 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6832  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6833  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6834  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6835  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6836  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6837  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6838  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
6839 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6840  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, NoneT, NoneT, NoneT,
6841  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6842  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6843  NoneT, NoneT, NoneT>
6844 {
6845  typedef Templates24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6846  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
6847 };
6848 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6849  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6850  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6851  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6852  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6853  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6854  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6855  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6856  GTEST_TEMPLATE_ T25>
6857 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6858  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, NoneT, NoneT, NoneT,
6859  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6860  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6861  NoneT, NoneT>
6862 {
6863  typedef Templates25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6864  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
6865 };
6866 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6867  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6868  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6869  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6870  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6871  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6872  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6873  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6874  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
6875 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6876  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, NoneT, NoneT,
6877  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6878  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6879  NoneT, NoneT>
6880 {
6881  typedef Templates26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6882  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> type;
6883 };
6884 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6885  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6886  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6887  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6888  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6889  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6890  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6891  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6892  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
6893 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6894  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, NoneT,
6895  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6896  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6897  NoneT, NoneT>
6898 {
6899  typedef Templates27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6900  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
6901  T27> type;
6902 };
6903 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6904  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6905  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6906  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6907  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6908  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6909  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6910  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6911  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6912  GTEST_TEMPLATE_ T28>
6913 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6914  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6915  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6916  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6917  NoneT, NoneT>
6918 {
6919  typedef Templates28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6920  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6921  T28> type;
6922 };
6923 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6924  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6925  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6926  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6927  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6928  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6929  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6930  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6931  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6932  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
6933 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6934  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6935  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6936  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6937  NoneT>
6938 {
6939  typedef Templates29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6940  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6941  T28, T29> type;
6942 };
6943 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6944  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6945  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6946  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6947  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6948  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6949  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6950  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6951  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6952  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
6953 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6954  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6955  T30, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6956  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6957 {
6958  typedef Templates30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6959  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6960  T28, T29, T30> type;
6961 };
6962 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6963  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6964  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6965  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6966  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6967  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6968  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6969  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6970  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6971  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6972  GTEST_TEMPLATE_ T31>
6973 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6974  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6975  T30, T31, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6976  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6977 {
6978  typedef Templates31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6979  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6980  T28, T29, T30, T31> type;
6981 };
6982 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6983  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6984  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6985  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6986  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6987  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6988  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6989  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6990  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6991  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6992  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
6993 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6994  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6995  T30, T31, T32, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6996  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
6997 {
6998  typedef Templates32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6999  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7000  T28, T29, T30, T31, T32> type;
7001 };
7002 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7003  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7004  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7005  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7006  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7007  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7008  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7009  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7010  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7011  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7012  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
7013 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7014  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7015  T30, T31, T32, T33, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
7016  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7017 {
7018  typedef Templates33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7019  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7020  T28, T29, T30, T31, T32, T33> type;
7021 };
7022 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7023  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7024  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7025  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7026  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7027  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7028  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7029  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7030  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7031  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7032  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7033  GTEST_TEMPLATE_ T34>
7034 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7035  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7036  T30, T31, T32, T33, T34, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
7037  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7038 {
7039  typedef Templates34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7040  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7041  T28, T29, T30, T31, T32, T33, T34> type;
7042 };
7043 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7044  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7045  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7046  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7047  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7048  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7049  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7050  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7051  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7052  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7053  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7054  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
7055 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7056  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7057  T30, T31, T32, T33, T34, T35, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
7058  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7059 {
7060  typedef Templates35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7061  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7062  T28, T29, T30, T31, T32, T33, T34, T35> type;
7063 };
7064 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7065  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7066  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7067  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7068  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7069  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7070  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7071  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7072  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7073  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7074  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7075  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
7076 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7077  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7078  T30, T31, T32, T33, T34, T35, T36, NoneT, NoneT, NoneT, NoneT, NoneT,
7079  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7080 {
7081  typedef Templates36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7082  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7083  T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
7084 };
7085 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7086  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7087  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7088  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7089  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7090  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7091  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7092  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7093  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7094  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7095  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7096  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7097  GTEST_TEMPLATE_ T37>
7098 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7099  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7100  T30, T31, T32, T33, T34, T35, T36, T37, NoneT, NoneT, NoneT, NoneT, NoneT,
7101  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7102 {
7103  typedef Templates37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7104  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7105  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
7106 };
7107 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7108  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7109  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7110  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7111  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7112  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7113  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7114  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7115  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7116  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7117  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7118  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7119  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
7120 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7121  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7122  T30, T31, T32, T33, T34, T35, T36, T37, T38, NoneT, NoneT, NoneT, NoneT,
7123  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7124 {
7125  typedef Templates38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7126  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7127  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
7128 };
7129 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7130  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7131  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7132  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7133  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7134  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7135  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7136  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7137  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7138  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7139  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7140  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7141  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
7142 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7143  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7144  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, NoneT, NoneT, NoneT,
7145  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7146 {
7147  typedef Templates39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7148  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7149  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
7150 };
7151 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7152  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7153  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7154  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7155  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7156  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7157  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7158  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7159  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7160  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7161  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7162  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7163  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7164  GTEST_TEMPLATE_ T40>
7165 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7166  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7167  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, NoneT, NoneT, NoneT,
7168  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7169 {
7170  typedef Templates40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7171  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7172  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> type;
7173 };
7174 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7175  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7176  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7177  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7178  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7179  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7180  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7181  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7182  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7183  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7184  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7185  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7186  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7187  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
7188 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7189  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7190  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, NoneT, NoneT,
7191  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7192 {
7193  typedef Templates41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7194  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7195  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
7196  T41> type;
7197 };
7198 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7199  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7200  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7201  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7202  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7203  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7204  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7205  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7206  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7207  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7208  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7209  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7210  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7211  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
7212 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7213  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7214  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, NoneT,
7215  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7216 {
7217  typedef Templates42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7218  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7219  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
7220  T42> type;
7221 };
7222 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7223  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7224  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7225  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7226  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7227  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7228  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7229  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7230  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7231  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7232  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7233  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7234  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7235  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
7236  GTEST_TEMPLATE_ T43>
7237 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7238  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7239  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
7240  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7241 {
7242  typedef Templates43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7243  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7244  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
7245  T42, T43> type;
7246 };
7247 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7248  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7249  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7250  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7251  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7252  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7253  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7254  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7255  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7256  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7257  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7258  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7259  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7260  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
7261  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
7262 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7263  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7264  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
7265  NoneT, NoneT, NoneT, NoneT, NoneT, NoneT>
7266 {
7267  typedef Templates44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7268  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7269  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
7270  T42, T43, T44> type;
7271 };
7272 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7273  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7274  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7275  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7276  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7277  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7278  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7279  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7280  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7281  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7282  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7283  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7284  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7285  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
7286  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
7287 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7288  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7289  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
7290  T45, NoneT, NoneT, NoneT, NoneT, NoneT>
7291 {
7292  typedef Templates45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7293  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7294  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
7295  T42, T43, T44, T45> type;
7296 };
7297 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7298  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7299  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7300  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7301  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7302  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7303  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7304  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7305  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7306  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7307  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7308  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7309  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7310  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
7311  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
7312  GTEST_TEMPLATE_ T46>
7313 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7314  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7315  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
7316  T45, T46, NoneT, NoneT, NoneT, NoneT>
7317 {
7318  typedef Templates46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7319  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7320  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
7321  T42, T43, T44, T45, T46> type;
7322 };
7323 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7324  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7325  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7326  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7327  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7328  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7329  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7330  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7331  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7332  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7333  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7334  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7335  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7336  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
7337  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
7338  GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
7339 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7340  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7341  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
7342  T45, T46, T47, NoneT, NoneT, NoneT>
7343 {
7344  typedef Templates47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7345  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7346  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
7347  T42, T43, T44, T45, T46, T47> type;
7348 };
7349 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7350  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7351  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7352  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7353  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7354  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7355  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7356  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7357  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7358  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7359  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7360  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7361  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7362  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
7363  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
7364  GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
7365 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7366  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7367  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
7368  T45, T46, T47, T48, NoneT, NoneT>
7369 {
7370  typedef Templates48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7371  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7372  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
7373  T42, T43, T44, T45, T46, T47, T48> type;
7374 };
7375 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
7376  GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
7377  GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
7378  GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
7379  GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
7380  GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
7381  GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
7382  GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
7383  GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
7384  GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
7385  GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
7386  GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
7387  GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
7388  GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
7389  GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
7390  GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
7391  GTEST_TEMPLATE_ T49>
7392 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
7393  T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
7394  T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
7395  T45, T46, T47, T48, T49, NoneT>
7396 {
7397  typedef Templates49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7398  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
7399  T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
7400  T42, T43, T44, T45, T46, T47, T48, T49> type;
7401 };
7402 
7403 // The TypeList template makes it possible to use either a single type
7404 // or a Types<...> list in TYPED_TEST_CASE() and
7405 // INSTANTIATE_TYPED_TEST_CASE_P().
7406 
7407 template <typename T>
7408 struct TypeList
7409 {
7410  typedef Types1<T> type;
7411 };
7412 
7413 template <typename T1, typename T2, typename T3, typename T4, typename T5,
7414  typename T6, typename T7, typename T8, typename T9, typename T10,
7415  typename T11, typename T12, typename T13, typename T14, typename T15,
7416  typename T16, typename T17, typename T18, typename T19, typename T20,
7417  typename T21, typename T22, typename T23, typename T24, typename T25,
7418  typename T26, typename T27, typename T28, typename T29, typename T30,
7419  typename T31, typename T32, typename T33, typename T34, typename T35,
7420  typename T36, typename T37, typename T38, typename T39, typename T40,
7421  typename T41, typename T42, typename T43, typename T44, typename T45,
7422  typename T46, typename T47, typename T48, typename T49, typename T50>
7423 struct TypeList<Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
7424  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
7425  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
7426  T44, T45, T46, T47, T48, T49, T50> >
7427 {
7428  typedef typename Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
7429  T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
7430  T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
7431  T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>::type type;
7432 };
7433 
7434 #endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
7435 
7436 } // namespace internal
7437 } // namespace testing
7438 
7439 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
7440 
7441 // Due to C++ preprocessor weirdness, we need double indirection to
7442 // concatenate two tokens when one of them is __LINE__. Writing
7443 //
7444 // foo ## __LINE__
7445 //
7446 // will result in the token foo__LINE__, instead of foo followed by
7447 // the current line number. For more details, see
7448 // http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6
7449 #define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
7450 #define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
7451 
7452 class ProtocolMessage;
7453 namespace proto2 { class Message; }
7454 
7455 namespace testing
7456 {
7457 
7458 // Forward declarations.
7459 
7460 class AssertionResult; // Result of an assertion.
7461 class Message; // Represents a failure message.
7462 class Test; // Represents a test.
7463 class TestInfo; // Information about a test.
7464 class TestPartResult; // Result of a test part.
7465 class UnitTest; // A collection of test cases.
7466 
7467 template <typename T>
7468 ::std::string PrintToString(const T & value);
7469 
7470 namespace internal
7471 {
7472 
7473 struct TraceInfo; // Information about a trace point.
7474 class ScopedTrace; // Implements scoped trace.
7475 class TestInfoImpl; // Opaque implementation of TestInfo
7476 class UnitTestImpl; // Opaque implementation of UnitTest
7477 
7478 // How many times InitGoogleTest() has been called.
7479 GTEST_API_ extern int g_init_gtest_count;
7480 
7481 // The text used in failure messages to indicate the start of the
7482 // stack trace.
7483 GTEST_API_ extern const char kStackTraceMarker[];
7484 
7485 // Two overloaded helpers for checking at compile time whether an
7486 // expression is a null pointer literal (i.e. NULL or any 0-valued
7487 // compile-time integral constant). Their return values have
7488 // different sizes, so we can use sizeof() to test which version is
7489 // picked by the compiler. These helpers have no implementations, as
7490 // we only need their signatures.
7491 //
7492 // Given IsNullLiteralHelper(x), the compiler will pick the first
7493 // version if x can be implicitly converted to Secret*, and pick the
7494 // second version otherwise. Since Secret is a secret and incomplete
7495 // type, the only expression a user can write that has type Secret* is
7496 // a null pointer literal. Therefore, we know that x is a null
7497 // pointer literal if and only if the first version is picked by the
7498 // compiler.
7499 char IsNullLiteralHelper(Secret * p);
7500 char (&IsNullLiteralHelper(...))[2]; // NOLINT
7501 
7502 // A compile-time bool constant that is true if and only if x is a
7503 // null pointer literal (i.e. NULL or any 0-valued compile-time
7504 // integral constant).
7505 #ifdef GTEST_ELLIPSIS_NEEDS_POD_
7506 // We lose support for NULL detection where the compiler doesn't like
7507 // passing non-POD classes through ellipsis (...).
7508 # define GTEST_IS_NULL_LITERAL_(x) false
7509 #else
7510 # define GTEST_IS_NULL_LITERAL_(x) \
7511  (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
7512 #endif // GTEST_ELLIPSIS_NEEDS_POD_
7513 
7514 // Appends the user-supplied message to the Google-Test-generated message.
7516  const std::string & gtest_msg, const Message & user_msg);
7517 
7518 #if GTEST_HAS_EXCEPTIONS
7519 
7520 // This exception is thrown by (and only by) a failed Google Test
7521 // assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions
7522 // are enabled). We derive it from std::runtime_error, which is for
7523 // errors presumably detectable only at run time. Since
7524 // std::runtime_error inherits from std::exception, many testing
7525 // frameworks know how to extract and print the message inside it.
7526 class GTEST_API_ GoogleTestFailureException : public ::std::runtime_error
7527 {
7528 public:
7529  explicit GoogleTestFailureException(const TestPartResult & failure);
7530 };
7531 
7532 #endif // GTEST_HAS_EXCEPTIONS
7533 
7534 // A helper class for creating scoped traces in user programs.
7535 class GTEST_API_ ScopedTrace
7536 {
7537 public:
7538  // The c'tor pushes the given source file location and message onto
7539  // a trace stack maintained by Google Test.
7540  ScopedTrace(const char * file, int line, const Message & message);
7541 
7542  // The d'tor pops the info pushed by the c'tor.
7543  //
7544  // Note that the d'tor is not virtual in order to be efficient.
7545  // Don't inherit from ScopedTrace!
7546  ~ScopedTrace();
7547 
7548 private:
7549  GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace);
7550 } GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its
7551 // c'tor and d'tor. Therefore it doesn't
7552 // need to be used otherwise.
7553 
7554 // Constructs and returns the message for an equality assertion
7555 // (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
7556 //
7557 // The first four parameters are the expressions used in the assertion
7558 // and their values, as strings. For example, for ASSERT_EQ(foo, bar)
7559 // where foo is 5 and bar is 6, we have:
7560 //
7561 // expected_expression: "foo"
7562 // actual_expression: "bar"
7563 // expected_value: "5"
7564 // actual_value: "6"
7565 //
7566 // The ignoring_case parameter is true iff the assertion is a
7567 // *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
7568 // be inserted into the message.
7569 GTEST_API_ AssertionResult EqFailure(const char * expected_expression,
7570  const char * actual_expression,
7571  const std::string & expected_value,
7572  const std::string & actual_value,
7573  bool ignoring_case);
7574 
7575 // Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
7577  const AssertionResult & assertion_result,
7578  const char * expression_text,
7579  const char * actual_predicate_value,
7580  const char * expected_predicate_value);
7581 
7582 // This template class represents an IEEE floating-point number
7583 // (either single-precision or double-precision, depending on the
7584 // template parameters).
7585 //
7586 // The purpose of this class is to do more sophisticated number
7587 // comparison. (Due to round-off error, etc, it's very unlikely that
7588 // two floating-points will be equal exactly. Hence a naive
7589 // comparison by the == operation often doesn't work.)
7590 //
7591 // Format of IEEE floating-point:
7592 //
7593 // The most-significant bit being the leftmost, an IEEE
7594 // floating-point looks like
7595 //
7596 // sign_bit exponent_bits fraction_bits
7597 //
7598 // Here, sign_bit is a single bit that designates the sign of the
7599 // number.
7600 //
7601 // For float, there are 8 exponent bits and 23 fraction bits.
7602 //
7603 // For double, there are 11 exponent bits and 52 fraction bits.
7604 //
7605 // More details can be found at
7606 // http://en.wikipedia.org/wiki/IEEE_floating-point_standard.
7607 //
7608 // Template parameter:
7609 //
7610 // RawType: the raw floating-point type (either float or double)
7611 template <typename RawType>
7612 class FloatingPoint
7613 {
7614 public:
7615  // Defines the unsigned integer type that has the same size as the
7616  // floating point number.
7618 
7619  // Constants.
7620 
7621  // # of bits in a number.
7622  static const size_t kBitCount = 8 * sizeof(RawType);
7623 
7624  // # of fraction bits in a number.
7625  static const size_t kFractionBitCount =
7626  std::numeric_limits<RawType>::digits - 1;
7627 
7628  // # of exponent bits in a number.
7629  static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;
7630 
7631  // The mask for the sign bit.
7632  static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);
7633 
7634  // The mask for the fraction bits.
7635  static const Bits kFractionBitMask =
7636  ~static_cast<Bits>(0) >> (kExponentBitCount + 1);
7637 
7638  // The mask for the exponent bits.
7639  static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);
7640 
7641  // How many ULP's (Units in the Last Place) we want to tolerate when
7642  // comparing two numbers. The larger the value, the more error we
7643  // allow. A 0 value means that two numbers must be exactly the same
7644  // to be considered equal.
7645  //
7646  // The maximum error of a single floating-point operation is 0.5
7647  // units in the last place. On Intel CPU's, all floating-point
7648  // calculations are done with 80-bit precision, while double has 64
7649  // bits. Therefore, 4 should be enough for ordinary use.
7650  //
7651  // See the following article for more details on ULP:
7652  // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
7653  static const size_t kMaxUlps = 4;
7654 
7655  // Constructs a FloatingPoint from a raw floating-point number.
7656  //
7657  // On an Intel CPU, passing a non-normalized NAN (Not a Number)
7658  // around may change its bits, although the new value is guaranteed
7659  // to be also a NAN. Therefore, don't expect this constructor to
7660  // preserve the bits in x when x is a NAN.
7661  explicit FloatingPoint(const RawType & x) { u_.value_ = x; }
7662 
7663  // Static methods
7664 
7665  // Reinterprets a bit pattern as a floating-point number.
7666  //
7667  // This function is needed to test the AlmostEquals() method.
7668  static RawType ReinterpretBits(const Bits bits)
7669  {
7670  FloatingPoint fp(0);
7671  fp.u_.bits_ = bits;
7672  return fp.u_.value_;
7673  }
7674 
7675  // Returns the floating-point number that represent positive infinity.
7676  static RawType Infinity()
7677  {
7678  return ReinterpretBits(kExponentBitMask);
7679  }
7680 
7681  // Returns the maximum representable finite floating-point number.
7682  static RawType Max();
7683 
7684  // Non-static methods
7685 
7686  // Returns the bits that represents this number.
7687  const Bits & bits() const { return u_.bits_; }
7688 
7689  // Returns the exponent bits of this number.
7690  Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
7691 
7692  // Returns the fraction bits of this number.
7693  Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }
7694 
7695  // Returns the sign bit of this number.
7696  Bits sign_bit() const { return kSignBitMask & u_.bits_; }
7697 
7698  // Returns true iff this is NAN (not a number).
7699  bool is_nan() const
7700  {
7701  // It's a NAN if the exponent bits are all ones and the fraction
7702  // bits are not entirely zeros.
7703  return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);
7704  }
7705 
7706  // Returns true iff this number is at most kMaxUlps ULP's away from
7707  // rhs. In particular, this function:
7708  //
7709  // - returns false if either number is (or both are) NAN.
7710  // - treats really large numbers as almost equal to infinity.
7711  // - thinks +0.0 and -0.0 are 0 DLP's apart.
7712  bool AlmostEquals(const FloatingPoint & rhs) const
7713  {
7714  // The IEEE standard says that any comparison operation involving
7715  // a NAN must return false.
7716  if (is_nan() || rhs.is_nan()) { return false; }
7717 
7718  return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_)
7719  <= kMaxUlps;
7720  }
7721 
7722 private:
7723  // The data type used to store the actual floating-point number.
7724  union FloatingPointUnion
7725  {
7726  RawType value_; // The raw floating-point number.
7727  Bits bits_; // The bits that represent the number.
7728  };
7729 
7730  // Converts an integer from the sign-and-magnitude representation to
7731  // the biased representation. More precisely, let N be 2 to the
7732  // power of (kBitCount - 1), an integer x is represented by the
7733  // unsigned number x + N.
7734  //
7735  // For instance,
7736  //
7737  // -N + 1 (the most negative number representable using
7738  // sign-and-magnitude) is represented by 1;
7739  // 0 is represented by N; and
7740  // N - 1 (the biggest number representable using
7741  // sign-and-magnitude) is represented by 2N - 1.
7742  //
7743  // Read http://en.wikipedia.org/wiki/Signed_number_representations
7744  // for more details on signed number representations.
7745  static Bits SignAndMagnitudeToBiased(const Bits & sam)
7746  {
7747  if (kSignBitMask & sam)
7748  {
7749  // sam represents a negative number.
7750  return ~sam + 1;
7751  }
7752 
7753  else
7754  {
7755  // sam represents a positive number.
7756  return kSignBitMask | sam;
7757  }
7758  }
7759 
7760  // Given two numbers in the sign-and-magnitude representation,
7761  // returns the distance between them as an unsigned number.
7762  static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits & sam1,
7763  const Bits & sam2)
7764  {
7765  const Bits biased1 = SignAndMagnitudeToBiased(sam1);
7766  const Bits biased2 = SignAndMagnitudeToBiased(sam2);
7767  return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
7768  }
7769 
7770  FloatingPointUnion u_;
7771 };
7772 
7773 // We cannot use std::numeric_limits<T>::max() as it clashes with the max()
7774 // macro defined by <windows.h>.
7775 template <>
7776 inline float FloatingPoint<float>::Max() { return FLT_MAX; }
7777 template <>
7778 inline double FloatingPoint<double>::Max() { return DBL_MAX; }
7779 
7780 // Typedefs the instances of the FloatingPoint template class that we
7781 // care to use.
7782 typedef FloatingPoint<float> Float;
7784 
7785 // In order to catch the mistake of putting tests that use different
7786 // test fixture classes in the same test case, we need to assign
7787 // unique IDs to fixture classes and compare them. The TypeId type is
7788 // used to hold such IDs. The user should treat TypeId as an opaque
7789 // type: the only operation allowed on TypeId values is to compare
7790 // them for equality using the == operator.
7791 typedef const void * TypeId;
7792 
7793 template <typename T>
7794 class TypeIdHelper
7795 {
7796 public:
7797  // dummy_ must not have a const type. Otherwise an overly eager
7798  // compiler (e.g. MSVC 7.1 & 8.0) may try to merge
7799  // TypeIdHelper<T>::dummy_ for different Ts as an "optimization".
7800  static bool dummy_;
7801 };
7802 
7803 template <typename T>
7804 bool TypeIdHelper<T>::dummy_ = false;
7805 
7806 // GetTypeId<T>() returns the ID of type T. Different values will be
7807 // returned for different types. Calling the function twice with the
7808 // same type argument is guaranteed to return the same ID.
7809 template <typename T>
7810 TypeId GetTypeId()
7811 {
7812  // The compiler is required to allocate a different
7813  // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
7814  // the template. Therefore, the address of dummy_ is guaranteed to
7815  // be unique.
7816  return &(TypeIdHelper<T>::dummy_);
7817 }
7818 
7819 // Returns the type ID of ::testing::Test. Always call this instead
7820 // of GetTypeId< ::testing::Test>() to get the type ID of
7821 // ::testing::Test, as the latter may give the wrong result due to a
7822 // suspected linker bug when compiling Google Test as a Mac OS X
7823 // framework.
7824 GTEST_API_ TypeId GetTestTypeId();
7825 
7826 // Defines the abstract factory interface that creates instances
7827 // of a Test object.
7828 class TestFactoryBase
7829 {
7830 public:
7831  virtual ~TestFactoryBase() {}
7832 
7833  // Creates a test instance to run. The instance is both created and destroyed
7834  // within TestInfoImpl::Run()
7835  virtual Test * CreateTest() = 0;
7836 
7837 protected:
7839 
7840 private:
7842 };
7843 
7844 // This class provides implementation of TeastFactoryBase interface.
7845 // It is used in TEST and TEST_F macros.
7846 template <class TestClass>
7847 class TestFactoryImpl : public TestFactoryBase
7848 {
7849 public:
7850  virtual Test * CreateTest() { return new TestClass; }
7851 };
7852 
7853 #if GTEST_OS_WINDOWS
7854 
7855 // Predicate-formatters for implementing the HRESULT checking macros
7856 // {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}
7857 // We pass a long instead of HRESULT to avoid causing an
7858 // include dependency for the HRESULT type.
7859 GTEST_API_ AssertionResult IsHRESULTSuccess(const char * expr,
7860  long hr); // NOLINT
7861 GTEST_API_ AssertionResult IsHRESULTFailure(const char * expr,
7862  long hr); // NOLINT
7863 
7864 #endif // GTEST_OS_WINDOWS
7865 
7866 // Types of SetUpTestCase() and TearDownTestCase() functions.
7867 typedef void (*SetUpTestCaseFunc)();
7868 typedef void (*TearDownTestCaseFunc)();
7869 
7870 // Creates a new TestInfo object and registers it with Google Test;
7871 // returns the created object.
7872 //
7873 // Arguments:
7874 //
7875 // test_case_name: name of the test case
7876 // name: name of the test
7877 // type_param the name of the test's type parameter, or NULL if
7878 // this is not a typed or a type-parameterized test.
7879 // value_param text representation of the test's value parameter,
7880 // or NULL if this is not a type-parameterized test.
7881 // fixture_class_id: ID of the test fixture class
7882 // set_up_tc: pointer to the function that sets up the test case
7883 // tear_down_tc: pointer to the function that tears down the test case
7884 // factory: pointer to the factory that creates a test object.
7885 // The newly created TestInfo instance will assume
7886 // ownership of the factory object.
7888  const char * test_case_name,
7889  const char * name,
7890  const char * type_param,
7891  const char * value_param,
7892  TypeId fixture_class_id,
7893  SetUpTestCaseFunc set_up_tc,
7894  TearDownTestCaseFunc tear_down_tc,
7895  TestFactoryBase * factory);
7896 
7897 // If *pstr starts with the given prefix, modifies *pstr to be right
7898 // past the prefix and returns true; otherwise leaves *pstr unchanged
7899 // and returns false. None of pstr, *pstr, and prefix can be NULL.
7900 GTEST_API_ bool SkipPrefix(const char * prefix, const char ** pstr);
7901 
7902 #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
7903 
7904 // State of the definition of a type-parameterized test case.
7905 class GTEST_API_ TypedTestCasePState
7906 {
7907 public:
7908  TypedTestCasePState() : registered_(false) {}
7909 
7910  // Adds the given test name to defined_test_names_ and return true
7911  // if the test case hasn't been registered; otherwise aborts the
7912  // program.
7913  bool AddTestName(const char * file, int line, const char * case_name,
7914  const char * test_name)
7915  {
7916  if (registered_)
7917  {
7918  fprintf(stderr, "%s Test %s must be defined before "
7919  "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n",
7920  FormatFileLocation(file, line).c_str(), test_name, case_name);
7921  fflush(stderr);
7922  posix::Abort();
7923  }
7924 
7925  defined_test_names_.insert(test_name);
7926  return true;
7927  }
7928 
7929  // Verifies that registered_tests match the test names in
7930  // defined_test_names_; returns registered_tests if successful, or
7931  // aborts the program otherwise.
7932  const char * VerifyRegisteredTestNames(
7933  const char * file, int line, const char * registered_tests);
7934 
7935 private:
7936  bool registered_;
7937  ::std::set<const char *> defined_test_names_;
7938 };
7939 
7940 // Skips to the first non-space char after the first comma in 'str';
7941 // returns NULL if no comma is found in 'str'.
7942 inline const char * SkipComma(const char * str)
7943 {
7944  const char * comma = strchr(str, ',');
7945 
7946  if (comma == NULL)
7947  {
7948  return NULL;
7949  }
7950 
7951  while (IsSpace(*(++comma))) {}
7952 
7953  return comma;
7954 }
7955 
7956 // Returns the prefix of 'str' before the first comma in it; returns
7957 // the entire string if it contains no comma.
7958 inline std::string GetPrefixUntilComma(const char * str)
7959 {
7960  const char * comma = strchr(str, ',');
7961  return comma == NULL ? str : std::string(str, comma);
7962 }
7963 
7964 // TypeParameterizedTest<Fixture, TestSel, Types>::Register()
7965 // registers a list of type-parameterized tests with Google Test. The
7966 // return value is insignificant - we just need to return something
7967 // such that we can call this function in a namespace scope.
7968 //
7969 // Implementation note: The GTEST_TEMPLATE_ macro declares a template
7970 // template parameter. It's defined in gtest-type-util.h.
7971 template <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>
7972 class TypeParameterizedTest
7973 {
7974 public:
7975  // 'index' is the index of the test in the type list 'Types'
7976  // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase,
7977  // Types). Valid values for 'index' are [0, N - 1] where N is the
7978  // length of Types.
7979  static bool Register(const char * prefix, const char * case_name,
7980  const char * test_names, int index)
7981  {
7982  typedef typename Types::Head Type;
7983  typedef Fixture<Type> FixtureClass;
7984  typedef typename GTEST_BIND_(TestSel, Type) TestClass;
7985 
7986  // First, registers the first type-parameterized test in the type
7987  // list.
7989  (std::string(prefix) + (prefix[0] == '\0' ? "" : "/") + case_name + "/"
7990  + StreamableToString(index)).c_str(),
7991  GetPrefixUntilComma(test_names).c_str(),
7992  GetTypeName<Type>().c_str(),
7993  NULL, // No value parameter.
7994  GetTypeId<FixtureClass>(),
7995  TestClass::SetUpTestCase,
7996  TestClass::TearDownTestCase,
7998 
7999  // Next, recurses (at compile time) with the tail of the type list.
8000  return TypeParameterizedTest<Fixture, TestSel, typename Types::Tail>
8001  ::Register(prefix, case_name, test_names, index + 1);
8002  }
8003 };
8004 
8005 // The base case for the compile time recursion.
8006 template <GTEST_TEMPLATE_ Fixture, class TestSel>
8007 class TypeParameterizedTest<Fixture, TestSel, Types0>
8008 {
8009 public:
8010  static bool Register(const char * /*prefix*/, const char * /*case_name*/,
8011  const char * /*test_names*/, int /*index*/)
8012  {
8013  return true;
8014  }
8015 };
8016 
8017 // TypeParameterizedTestCase<Fixture, Tests, Types>::Register()
8018 // registers *all combinations* of 'Tests' and 'Types' with Google
8019 // Test. The return value is insignificant - we just need to return
8020 // something such that we can call this function in a namespace scope.
8021 template <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>
8022 class TypeParameterizedTestCase
8023 {
8024 public:
8025  static bool Register(const char * prefix, const char * case_name,
8026  const char * test_names)
8027  {
8028  typedef typename Tests::Head Head;
8029 
8030  // First, register the first test in 'Test' for each type in 'Types'.
8031  TypeParameterizedTest<Fixture, Head, Types>::Register(
8032  prefix, case_name, test_names, 0);
8033 
8034  // Next, recurses (at compile time) with the tail of the test list.
8035  return TypeParameterizedTestCase<Fixture, typename Tests::Tail, Types>
8036  ::Register(prefix, case_name, SkipComma(test_names));
8037  }
8038 };
8039 
8040 // The base case for the compile time recursion.
8041 template <GTEST_TEMPLATE_ Fixture, typename Types>
8042 class TypeParameterizedTestCase<Fixture, Templates0, Types>
8043 {
8044 public:
8045  static bool Register(const char * /*prefix*/, const char * /*case_name*/,
8046  const char * /*test_names*/)
8047  {
8048  return true;
8049  }
8050 };
8051 
8052 #endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
8053 
8054 // Returns the current OS stack trace as an std::string.
8055 //
8056 // The maximum number of stack frames to be included is specified by
8057 // the gtest_stack_trace_depth flag. The skip_count parameter
8058 // specifies the number of top frames to be skipped, which doesn't
8059 // count against the number of frames to be included.
8060 //
8061 // For example, if Foo() calls Bar(), which in turn calls
8062 // GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
8063 // the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
8065  UnitTest * unit_test, int skip_count);
8066 
8067 // Helpers for suppressing warnings on unreachable code or constant
8068 // condition.
8069 
8070 // Always returns true.
8071 GTEST_API_ bool AlwaysTrue();
8072 
8073 // Always returns false.
8074 inline bool AlwaysFalse() { return !AlwaysTrue(); }
8075 
8076 // Helper for suppressing false warning from Clang on a const char*
8077 // variable declared in a conditional expression always being NULL in
8078 // the else branch.
8079 struct GTEST_API_ ConstCharPtr
8080 {
8081  ConstCharPtr(const char * str) : value(str) {}
8082  operator bool() const { return true; }
8083  const char * value;
8084 };
8085 
8086 // A simple Linear Congruential Generator for generating random
8087 // numbers with a uniform distribution. Unlike rand() and srand(), it
8088 // doesn't use global state (and therefore can't interfere with user
8089 // code). Unlike rand_r(), it's portable. An LCG isn't very random,
8090 // but it's good enough for our purposes.
8091 class GTEST_API_ Random
8092 {
8093 public:
8094  static const UInt32 kMaxRange = 1u << 31;
8095 
8096  explicit Random(UInt32 seed) : state_(seed) {}
8097 
8098  void Reseed(UInt32 seed) { state_ = seed; }
8099 
8100  // Generates a random number from [0, range). Crashes if 'range' is
8101  // 0 or greater than kMaxRange.
8102  UInt32 Generate(UInt32 range);
8103 
8104 private:
8105  UInt32 state_;
8107 };
8108 
8109 // Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a
8110 // compiler error iff T1 and T2 are different types.
8111 template <typename T1, typename T2>
8113 
8114 template <typename T>
8115 struct CompileAssertTypesEqual<T, T>
8116 {
8117 };
8118 
8119 // Removes the reference from a type if it is a reference type,
8120 // otherwise leaves it unchanged. This is the same as
8121 // tr1::remove_reference, which is not widely available yet.
8122 template <typename T>
8123 struct RemoveReference { typedef T type; }; // NOLINT
8124 template <typename T>
8125 struct RemoveReference<T &> { typedef T type; }; // NOLINT
8126 
8127 // A handy wrapper around RemoveReference that works when the argument
8128 // T depends on template parameters.
8129 #define GTEST_REMOVE_REFERENCE_(T) \
8130  typename ::testing::internal::RemoveReference<T>::type
8131 
8132 // Removes const from a type if it is a const type, otherwise leaves
8133 // it unchanged. This is the same as tr1::remove_const, which is not
8134 // widely available yet.
8135 template <typename T>
8136 struct RemoveConst { typedef T type; }; // NOLINT
8137 template <typename T>
8138 struct RemoveConst<const T> { typedef T type; }; // NOLINT
8139 
8140 // MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above
8141 // definition to fail to remove the const in 'const int[3]' and 'const
8142 // char[3][4]'. The following specialization works around the bug.
8143 template <typename T, size_t N>
8144 struct RemoveConst<const T[N]>
8145 {
8146  typedef typename RemoveConst<T>::type type[N];
8147 };
8148 
8149 #if defined(_MSC_VER) && _MSC_VER < 1400
8150 // This is the only specialization that allows VC++ 7.1 to remove const in
8151 // 'const int[3] and 'const int[3][4]'. However, it causes trouble with GCC
8152 // and thus needs to be conditionally compiled.
8153 template <typename T, size_t N>
8154 struct RemoveConst<T[N]>
8155 {
8156  typedef typename RemoveConst<T>::type type[N];
8157 };
8158 #endif
8159 
8160 // A handy wrapper around RemoveConst that works when the argument
8161 // T depends on template parameters.
8162 #define GTEST_REMOVE_CONST_(T) \
8163  typename ::testing::internal::RemoveConst<T>::type
8164 
8165 // Turns const U&, U&, const U, and U all into U.
8166 #define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
8167  GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
8168 
8169 // Adds reference to a type if it is not a reference type,
8170 // otherwise leaves it unchanged. This is the same as
8171 // tr1::add_reference, which is not widely available yet.
8172 template <typename T>
8173 struct AddReference { typedef T & type; }; // NOLINT
8174 template <typename T>
8175 struct AddReference<T &> { typedef T & type; }; // NOLINT
8176 
8177 // A handy wrapper around AddReference that works when the argument T
8178 // depends on template parameters.
8179 #define GTEST_ADD_REFERENCE_(T) \
8180  typename ::testing::internal::AddReference<T>::type
8181 
8182 // Adds a reference to const on top of T as necessary. For example,
8183 // it transforms
8184 //
8185 // char ==> const char&
8186 // const char ==> const char&
8187 // char& ==> const char&
8188 // const char& ==> const char&
8189 //
8190 // The argument T must depend on some template parameters.
8191 #define GTEST_REFERENCE_TO_CONST_(T) \
8192  GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T))
8193 
8194 // ImplicitlyConvertible<From, To>::value is a compile-time bool
8195 // constant that's true iff type From can be implicitly converted to
8196 // type To.
8197 template <typename From, typename To>
8198 class ImplicitlyConvertible
8199 {
8200 private:
8201  // We need the following helper functions only for their types.
8202  // They have no implementations.
8203 
8204  // MakeFrom() is an expression whose type is From. We cannot simply
8205  // use From(), as the type From may not have a public default
8206  // constructor.
8207  static From MakeFrom();
8208 
8209  // These two functions are overloaded. Given an expression
8210  // Helper(x), the compiler will pick the first version if x can be
8211  // implicitly converted to type To; otherwise it will pick the
8212  // second version.
8213  //
8214  // The first version returns a value of size 1, and the second
8215  // version returns a value of size 2. Therefore, by checking the
8216  // size of Helper(x), which can be done at compile time, we can tell
8217  // which version of Helper() is used, and hence whether x can be
8218  // implicitly converted to type To.
8219  static char Helper(To);
8220  static char (&Helper(...))[2]; // NOLINT
8221 
8222  // We have to put the 'public' section after the 'private' section,
8223  // or MSVC refuses to compile the code.
8224 public:
8225  // MSVC warns about implicitly converting from double to int for
8226  // possible loss of data, so we need to temporarily disable the
8227  // warning.
8228 #ifdef _MSC_VER
8229 # pragma warning(push) // Saves the current warning state.
8230 # pragma warning(disable:4244) // Temporarily disables warning 4244.
8231 
8232  static const bool value =
8233  sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
8234 # pragma warning(pop) // Restores the warning state.
8235 #elif defined(__BORLANDC__)
8236  // C++Builder cannot use member overload resolution during template
8237  // instantiation. The simplest workaround is to use its C++0x type traits
8238  // functions (C++Builder 2009 and above only).
8239  static const bool value = __is_convertible(From, To);
8240 #else
8241  static const bool value =
8242  sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
8243 #endif // _MSV_VER
8244 };
8245 template <typename From, typename To>
8246 const bool ImplicitlyConvertible<From, To>::value;
8247 
8248 // IsAProtocolMessage<T>::value is a compile-time bool constant that's
8249 // true iff T is type ProtocolMessage, proto2::Message, or a subclass
8250 // of those.
8251 template <typename T>
8252 struct IsAProtocolMessage
8253  : public bool_constant <
8254  ImplicitlyConvertible<const T *, const ::ProtocolMessage *>::value ||
8255  ImplicitlyConvertible<const T *, const ::proto2::Message *>::value >
8256 {
8257 };
8258 
8259 // When the compiler sees expression IsContainerTest<C>(0), if C is an
8260 // STL-style container class, the first overload of IsContainerTest
8261 // will be viable (since both C::iterator* and C::const_iterator* are
8262 // valid types and NULL can be implicitly converted to them). It will
8263 // be picked over the second overload as 'int' is a perfect match for
8264 // the type of argument 0. If C::iterator or C::const_iterator is not
8265 // a valid type, the first overload is not viable, and the second
8266 // overload will be picked. Therefore, we can determine whether C is
8267 // a container class by checking the type of IsContainerTest<C>(0).
8268 // The value of the expression is insignificant.
8269 //
8270 // Note that we look for both C::iterator and C::const_iterator. The
8271 // reason is that C++ injects the name of a class as a member of the
8272 // class itself (e.g. you can refer to class iterator as either
8273 // 'iterator' or 'iterator::iterator'). If we look for C::iterator
8274 // only, for example, we would mistakenly think that a class named
8275 // iterator is an STL container.
8276 //
8277 // Also note that the simpler approach of overloading
8278 // IsContainerTest(typename C::const_iterator*) and
8279 // IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.
8280 typedef int IsContainer;
8281 template <class C>
8282 IsContainer IsContainerTest(int /* dummy */,
8283  typename C::iterator * /* it */ = NULL,
8284  typename C::const_iterator * /* const_it */ = NULL)
8285 {
8286  return 0;
8287 }
8288 
8289 typedef char IsNotContainer;
8290 template <class C>
8291 IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; }
8292 
8293 // EnableIf<condition>::type is void when 'Cond' is true, and
8294 // undefined when 'Cond' is false. To use SFINAE to make a function
8295 // overload only apply when a particular expression is true, add
8296 // "typename EnableIf<expression>::type* = 0" as the last parameter.
8297 template<bool> struct EnableIf;
8298 template<> struct EnableIf<true> { typedef void type; }; // NOLINT
8299 
8300 // Utilities for native arrays.
8301 
8302 // ArrayEq() compares two k-dimensional native arrays using the
8303 // elements' operator==, where k can be any integer >= 0. When k is
8304 // 0, ArrayEq() degenerates into comparing a single pair of values.
8305 
8306 template <typename T, typename U>
8307 bool ArrayEq(const T * lhs, size_t size, const U * rhs);
8308 
8309 // This generic version is used when k is 0.
8310 template <typename T, typename U>
8311 inline bool ArrayEq(const T & lhs, const U & rhs) { return lhs == rhs; }
8312 
8313 // This overload is used when k >= 1.
8314 template <typename T, typename U, size_t N>
8315 inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N])
8316 {
8317  return internal::ArrayEq(lhs, N, rhs);
8318 }
8319 
8320 // This helper reduces code bloat. If we instead put its logic inside
8321 // the previous ArrayEq() function, arrays with different sizes would
8322 // lead to different copies of the template code.
8323 template <typename T, typename U>
8324 bool ArrayEq(const T * lhs, size_t size, const U * rhs)
8325 {
8326  for (size_t i = 0; i != size; i++)
8327  {
8328  if (!internal::ArrayEq(lhs[i], rhs[i]))
8329  { return false; }
8330  }
8331 
8332  return true;
8333 }
8334 
8335 // Finds the first element in the iterator range [begin, end) that
8336 // equals elem. Element may be a native array type itself.
8337 template <typename Iter, typename Element>
8338 Iter ArrayAwareFind(Iter begin, Iter end, const Element & elem)
8339 {
8340  for (Iter it = begin; it != end; ++it)
8341  {
8342  if (internal::ArrayEq(*it, elem))
8343  { return it; }
8344  }
8345 
8346  return end;
8347 }
8348 
8349 // CopyArray() copies a k-dimensional native array using the elements'
8350 // operator=, where k can be any integer >= 0. When k is 0,
8351 // CopyArray() degenerates into copying a single value.
8352 
8353 template <typename T, typename U>
8354 void CopyArray(const T * from, size_t size, U * to);
8355 
8356 // This generic version is used when k is 0.
8357 template <typename T, typename U>
8358 inline void CopyArray(const T & from, U * to) { *to = from; }
8359 
8360 // This overload is used when k >= 1.
8361 template <typename T, typename U, size_t N>
8362 inline void CopyArray(const T(&from)[N], U(*to)[N])
8363 {
8364  internal::CopyArray(from, N, *to);
8365 }
8366 
8367 // This helper reduces code bloat. If we instead put its logic inside
8368 // the previous CopyArray() function, arrays with different sizes
8369 // would lead to different copies of the template code.
8370 template <typename T, typename U>
8371 void CopyArray(const T * from, size_t size, U * to)
8372 {
8373  for (size_t i = 0; i != size; i++)
8374  {
8375  internal::CopyArray(from[i], to + i);
8376  }
8377 }
8378 
8379 // The relation between an NativeArray object (see below) and the
8380 // native array it represents.
8382 {
8383  kReference, // The NativeArray references the native array.
8384  kCopy // The NativeArray makes a copy of the native array and
8385  // owns the copy.
8386 };
8387 
8388 // Adapts a native array to a read-only STL-style container. Instead
8389 // of the complete STL container concept, this adaptor only implements
8390 // members useful for Google Mock's container matchers. New members
8391 // should be added as needed. To simplify the implementation, we only
8392 // support Element being a raw type (i.e. having no top-level const or
8393 // reference modifier). It's the client's responsibility to satisfy
8394 // this requirement. Element can be an array type itself (hence
8395 // multi-dimensional arrays are supported).
8396 template <typename Element>
8397 class NativeArray
8398 {
8399 public:
8400  // STL-style container typedefs.
8401  typedef Element value_type;
8402  typedef Element * iterator;
8403  typedef const Element * const_iterator;
8404 
8405  // Constructs from a native array.
8406  NativeArray(const Element * array, size_t count, RelationToSource relation)
8407  {
8408  Init(array, count, relation);
8409  }
8410 
8411  // Copy constructor.
8413  {
8414  Init(rhs.array_, rhs.size_, rhs.relation_to_source_);
8415  }
8416 
8418  {
8419  // Ensures that the user doesn't instantiate NativeArray with a
8420  // const or reference type.
8421  static_cast<void>(StaticAssertTypeEqHelper<Element,
8422  GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>());
8423 
8424  if (relation_to_source_ == kCopy)
8425  { delete[] array_; }
8426  }
8427 
8428  // STL-style container methods.
8429  size_t size() const { return size_; }
8430  const_iterator begin() const { return array_; }
8431  const_iterator end() const { return array_ + size_; }
8432  bool operator==(const NativeArray & rhs) const
8433  {
8434  return size() == rhs.size() &&
8435  ArrayEq(begin(), size(), rhs.begin());
8436  }
8437 
8438 private:
8439  // Initializes this object; makes a copy of the input array if
8440  // 'relation' is kCopy.
8441  void Init(const Element * array, size_t a_size, RelationToSource relation)
8442  {
8443  if (relation == kReference)
8444  {
8445  array_ = array;
8446  }
8447 
8448  else
8449  {
8450  Element * const copy = new Element[a_size];
8451  CopyArray(array, a_size, copy);
8452  array_ = copy;
8453  }
8454 
8455  size_ = a_size;
8456  relation_to_source_ = relation;
8457  }
8458 
8459  const Element * array_;
8460  size_t size_;
8461  RelationToSource relation_to_source_;
8462 
8464 };
8465 
8466 } // namespace internal
8467 } // namespace testing
8468 
8469 #define GTEST_MESSAGE_AT_(file, line, message, result_type) \
8470  ::testing::internal::AssertHelper(result_type, file, line, message) \
8471  = ::testing::Message()
8472 
8473 #define GTEST_MESSAGE_(message, result_type) \
8474  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
8475 
8476 #define GTEST_FATAL_FAILURE_(message) \
8477  return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
8478 
8479 #define GTEST_NONFATAL_FAILURE_(message) \
8480  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
8481 
8482 #define GTEST_SUCCESS_(message) \
8483  GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
8484 
8485 // Suppresses MSVC warnings 4072 (unreachable code) for the code following
8486 // statement if it returns or throws (or doesn't return or throw in some
8487 // situations).
8488 #define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \
8489  if (::testing::internal::AlwaysTrue()) { statement; }
8490 
8491 #define GTEST_TEST_THROW_(statement, expected_exception, fail) \
8492  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8493  if (::testing::internal::ConstCharPtr gtest_msg = "") { \
8494  bool gtest_caught_expected = false; \
8495  try { \
8496  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8497  } \
8498  catch (expected_exception const&) { \
8499  gtest_caught_expected = true; \
8500  } \
8501  catch (...) { \
8502  gtest_msg.value = \
8503  "Expected: " #statement " throws an exception of type " \
8504  #expected_exception ".\n Actual: it throws a different type."; \
8505  goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
8506  } \
8507  if (!gtest_caught_expected) { \
8508  gtest_msg.value = \
8509  "Expected: " #statement " throws an exception of type " \
8510  #expected_exception ".\n Actual: it throws nothing."; \
8511  goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
8512  } \
8513  } else \
8514  GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \
8515  fail(gtest_msg.value)
8516 
8517 #define GTEST_TEST_NO_THROW_(statement, fail) \
8518  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8519  if (::testing::internal::AlwaysTrue()) { \
8520  try { \
8521  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8522  } \
8523  catch (...) { \
8524  goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
8525  } \
8526  } else \
8527  GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
8528  fail("Expected: " #statement " doesn't throw an exception.\n" \
8529  " Actual: it throws.")
8530 
8531 #define GTEST_TEST_ANY_THROW_(statement, fail) \
8532  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8533  if (::testing::internal::AlwaysTrue()) { \
8534  bool gtest_caught_any = false; \
8535  try { \
8536  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8537  } \
8538  catch (...) { \
8539  gtest_caught_any = true; \
8540  } \
8541  if (!gtest_caught_any) { \
8542  goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
8543  } \
8544  } else \
8545  GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \
8546  fail("Expected: " #statement " throws an exception.\n" \
8547  " Actual: it doesn't.")
8548 
8549 
8550 // Implements Boolean test assertions such as EXPECT_TRUE. expression can be
8551 // either a boolean expression or an AssertionResult. text is a textual
8552 // represenation of expression as it was passed into the EXPECT_TRUE.
8553 #define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
8554  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8555  if (const ::testing::AssertionResult gtest_ar_ = \
8556  ::testing::AssertionResult(expression)) \
8557  ; \
8558  else \
8559  fail(::testing::internal::GetBoolAssertionFailureMessage(\
8560  gtest_ar_, text, #actual, #expected).c_str())
8561 
8562 #define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
8563  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8564  if (::testing::internal::AlwaysTrue()) { \
8565  ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
8566  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8567  if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
8568  goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
8569  } \
8570  } else \
8571  GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \
8572  fail("Expected: " #statement " doesn't generate new fatal " \
8573  "failures in the current thread.\n" \
8574  " Actual: it does.")
8575 
8576 // Expands to the name of the class that implements the given test.
8577 #define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
8578  test_case_name##_##test_name##_Test
8579 
8580 // Helper macro for defining tests.
8581 #define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\
8582 class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
8583  public:\
8584  GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
8585  private:\
8586  virtual void TestBody();\
8587  static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
8588  GTEST_DISALLOW_COPY_AND_ASSIGN_(\
8589  GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
8590 };\
8591 \
8592 ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
8593  ::test_info_ =\
8594  ::testing::internal::MakeAndRegisterTestInfo(\
8595  #test_case_name, #test_name, NULL, NULL, \
8596  (parent_id), \
8597  parent_class::SetUpTestCase, \
8598  parent_class::TearDownTestCase, \
8599  new ::testing::internal::TestFactoryImpl<\
8600  GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
8601 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
8602 
8603 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
8604 // Copyright 2005, Google Inc.
8605 // All rights reserved.
8606 //
8607 // Redistribution and use in source and binary forms, with or without
8608 // modification, are permitted provided that the following conditions are
8609 // met:
8610 //
8611 // * Redistributions of source code must retain the above copyright
8612 // notice, this list of conditions and the following disclaimer.
8613 // * Redistributions in binary form must reproduce the above
8614 // copyright notice, this list of conditions and the following disclaimer
8615 // in the documentation and/or other materials provided with the
8616 // distribution.
8617 // * Neither the name of Google Inc. nor the names of its
8618 // contributors may be used to endorse or promote products derived from
8619 // this software without specific prior written permission.
8620 //
8621 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8622 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8623 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8624 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8625 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8626 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8627 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8628 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8629 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8630 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8631 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8632 //
8633 // Author: wan@google.com (Zhanyong Wan)
8634 //
8635 // The Google C++ Testing Framework (Google Test)
8636 //
8637 // This header file defines the public API for death tests. It is
8638 // #included by gtest.h so a user doesn't need to include this
8639 // directly.
8640 
8641 #ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
8642 #define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
8643 
8644 // Copyright 2005, Google Inc.
8645 // All rights reserved.
8646 //
8647 // Redistribution and use in source and binary forms, with or without
8648 // modification, are permitted provided that the following conditions are
8649 // met:
8650 //
8651 // * Redistributions of source code must retain the above copyright
8652 // notice, this list of conditions and the following disclaimer.
8653 // * Redistributions in binary form must reproduce the above
8654 // copyright notice, this list of conditions and the following disclaimer
8655 // in the documentation and/or other materials provided with the
8656 // distribution.
8657 // * Neither the name of Google Inc. nor the names of its
8658 // contributors may be used to endorse or promote products derived from
8659 // this software without specific prior written permission.
8660 //
8661 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8662 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8663 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8664 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8665 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8666 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8667 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8668 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8669 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8670 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8671 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8672 //
8673 // Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
8674 //
8675 // The Google C++ Testing Framework (Google Test)
8676 //
8677 // This header file defines internal utilities needed for implementing
8678 // death tests. They are subject to change without notice.
8679 
8680 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
8681 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
8682 
8683 
8684 #include <stdio.h>
8685 
8686 namespace testing
8687 {
8688 namespace internal
8689 {
8690 
8691 GTEST_DECLARE_string_(internal_run_death_test);
8692 
8693 // Names of the flags (needed for parsing Google Test flags).
8694 const char kDeathTestStyleFlag[] = "death_test_style";
8695 const char kDeathTestUseFork[] = "death_test_use_fork";
8696 const char kInternalRunDeathTestFlag[] = "internal_run_death_test";
8697 
8698 #if GTEST_HAS_DEATH_TEST
8699 
8700 // DeathTest is a class that hides much of the complexity of the
8701 // GTEST_DEATH_TEST_ macro. It is abstract; its static Create method
8702 // returns a concrete class that depends on the prevailing death test
8703 // style, as defined by the --gtest_death_test_style and/or
8704 // --gtest_internal_run_death_test flags.
8705 
8706 // In describing the results of death tests, these terms are used with
8707 // the corresponding definitions:
8708 //
8709 // exit status: The integer exit information in the format specified
8710 // by wait(2)
8711 // exit code: The integer code passed to exit(3), _exit(2), or
8712 // returned from main()
8713 class GTEST_API_ DeathTest
8714 {
8715 public:
8716  // Create returns false if there was an error determining the
8717  // appropriate action to take for the current death test; for example,
8718  // if the gtest_death_test_style flag is set to an invalid value.
8719  // The LastMessage method will return a more detailed message in that
8720  // case. Otherwise, the DeathTest pointer pointed to by the "test"
8721  // argument is set. If the death test should be skipped, the pointer
8722  // is set to NULL; otherwise, it is set to the address of a new concrete
8723  // DeathTest object that controls the execution of the current test.
8724  static bool Create(const char * statement, const RE * regex,
8725  const char * file, int line, DeathTest ** test);
8726  DeathTest();
8727  virtual ~DeathTest() { }
8728 
8729  // A helper class that aborts a death test when it's deleted.
8730  class ReturnSentinel
8731  {
8732  public:
8733  explicit ReturnSentinel(DeathTest * test) : test_(test) { }
8734  ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); }
8735  private:
8736  DeathTest * const test_;
8737  GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel);
8739 
8740  // An enumeration of possible roles that may be taken when a death
8741  // test is encountered. EXECUTE means that the death test logic should
8742  // be executed immediately. OVERSEE means that the program should prepare
8743  // the appropriate environment for a child process to execute the death
8744  // test, then wait for it to complete.
8745  enum TestRole { OVERSEE_TEST, EXECUTE_TEST };
8746 
8747  // An enumeration of the three reasons that a test might be aborted.
8748  enum AbortReason
8749  {
8750  TEST_ENCOUNTERED_RETURN_STATEMENT,
8751  TEST_THREW_EXCEPTION,
8752  TEST_DID_NOT_DIE
8753  };
8754 
8755  // Assumes one of the above roles.
8756  virtual TestRole AssumeRole() = 0;
8757 
8758  // Waits for the death test to finish and returns its status.
8759  virtual int Wait() = 0;
8760 
8761  // Returns true if the death test passed; that is, the test process
8762  // exited during the test, its exit status matches a user-supplied
8763  // predicate, and its stderr output matches a user-supplied regular
8764  // expression.
8765  // The user-supplied predicate may be a macro expression rather
8766  // than a function pointer or functor, or else Wait and Passed could
8767  // be combined.
8768  virtual bool Passed(bool exit_status_ok) = 0;
8769 
8770  // Signals that the death test did not die as expected.
8771  virtual void Abort(AbortReason reason) = 0;
8772 
8773  // Returns a human-readable outcome message regarding the outcome of
8774  // the last death test.
8775  static const char * LastMessage();
8776 
8777  static void set_last_death_test_message(const std::string & message);
8778 
8779 private:
8780  // A string containing a description of the outcome of the last death test.
8781  static std::string last_death_test_message_;
8782 
8784 };
8785 
8786 // Factory interface for death tests. May be mocked out for testing.
8787 class DeathTestFactory
8788 {
8789 public:
8790  virtual ~DeathTestFactory() { }
8791  virtual bool Create(const char * statement, const RE * regex,
8792  const char * file, int line, DeathTest ** test) = 0;
8793 };
8794 
8795 // A concrete DeathTestFactory implementation for normal use.
8796 class DefaultDeathTestFactory : public DeathTestFactory
8797 {
8798 public:
8799  virtual bool Create(const char * statement, const RE * regex,
8800  const char * file, int line, DeathTest ** test);
8801 };
8802 
8803 // Returns true if exit_status describes a process that was terminated
8804 // by a signal, or exited normally with a nonzero exit code.
8805 GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
8806 
8807 // Traps C++ exceptions escaping statement and reports them as test
8808 // failures. Note that trapping SEH exceptions is not implemented here.
8809 # if GTEST_HAS_EXCEPTIONS
8810 # define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
8811  try { \
8812  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8813  } catch (const ::std::exception& gtest_exception) { \
8814  fprintf(\
8815  stderr, \
8816  "\n%s: Caught std::exception-derived exception escaping the " \
8817  "death test statement. Exception message: %s\n", \
8818  ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \
8819  gtest_exception.what()); \
8820  fflush(stderr); \
8821  death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
8822  } catch (...) { \
8823  death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
8824  }
8825 
8826 # else
8827 # define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
8828  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
8829 
8830 # endif
8831 
8832 // This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*,
8833 // ASSERT_EXIT*, and EXPECT_EXIT*.
8834 # define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \
8835  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8836  if (::testing::internal::AlwaysTrue()) { \
8837  const ::testing::internal::RE& gtest_regex = (regex); \
8838  ::testing::internal::DeathTest* gtest_dt; \
8839  if (!::testing::internal::DeathTest::Create(#statement, &gtest_regex, \
8840  __FILE__, __LINE__, &gtest_dt)) { \
8841  goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
8842  } \
8843  if (gtest_dt != NULL) { \
8844  ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \
8845  gtest_dt_ptr(gtest_dt); \
8846  switch (gtest_dt->AssumeRole()) { \
8847  case ::testing::internal::DeathTest::OVERSEE_TEST: \
8848  if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \
8849  goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
8850  } \
8851  break; \
8852  case ::testing::internal::DeathTest::EXECUTE_TEST: { \
8853  ::testing::internal::DeathTest::ReturnSentinel \
8854  gtest_sentinel(gtest_dt); \
8855  GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt); \
8856  gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
8857  break; \
8858  } \
8859  default: \
8860  break; \
8861  } \
8862  } \
8863  } else \
8864  GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__): \
8865  fail(::testing::internal::DeathTest::LastMessage())
8866 // The symbol "fail" here expands to something into which a message
8867 // can be streamed.
8868 
8869 // This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in
8870 // NDEBUG mode. In this case we need the statements to be executed, the regex is
8871 // ignored, and the macro must accept a streamed message even though the message
8872 // is never printed.
8873 # define GTEST_EXECUTE_STATEMENT_(statement, regex) \
8874  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8875  if (::testing::internal::AlwaysTrue()) { \
8876  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8877  } else \
8878  ::testing::Message()
8879 
8880 // A class representing the parsed contents of the
8881 // --gtest_internal_run_death_test flag, as it existed when
8882 // RUN_ALL_TESTS was called.
8883 class InternalRunDeathTestFlag
8884 {
8885 public:
8886  InternalRunDeathTestFlag(const std::string & a_file,
8887  int a_line,
8888  int an_index,
8889  int a_write_fd)
8890  : file_(a_file), line_(a_line), index_(an_index),
8891  write_fd_(a_write_fd) {}
8892 
8893  ~InternalRunDeathTestFlag()
8894  {
8895  if (write_fd_ >= 0)
8896  { posix::Close(write_fd_); }
8897  }
8898 
8899  const std::string & file() const { return file_; }
8900  int line() const { return line_; }
8901  int index() const { return index_; }
8902  int write_fd() const { return write_fd_; }
8903 
8904 private:
8905  std::string file_;
8906  int line_;
8907  int index_;
8908  int write_fd_;
8909 
8910  GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag);
8911 };
8912 
8913 // Returns a newly created InternalRunDeathTestFlag object with fields
8914 // initialized from the GTEST_FLAG(internal_run_death_test) flag if
8915 // the flag is specified; otherwise returns NULL.
8916 InternalRunDeathTestFlag * ParseInternalRunDeathTestFlag();
8917 
8918 #else // GTEST_HAS_DEATH_TEST
8919 
8920 // This macro is used for implementing macros such as
8921 // EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
8922 // death tests are not supported. Those macros must compile on such systems
8923 // iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
8924 // systems that support death tests. This allows one to write such a macro
8925 // on a system that does not support death tests and be sure that it will
8926 // compile on a death-test supporting system.
8927 //
8928 // Parameters:
8929 // statement - A statement that a macro such as EXPECT_DEATH would test
8930 // for program termination. This macro has to make sure this
8931 // statement is compiled but not executed, to ensure that
8932 // EXPECT_DEATH_IF_SUPPORTED compiles with a certain
8933 // parameter iff EXPECT_DEATH compiles with it.
8934 // regex - A regex that a macro such as EXPECT_DEATH would use to test
8935 // the output of statement. This parameter has to be
8936 // compiled but not evaluated by this macro, to ensure that
8937 // this macro only accepts expressions that a macro such as
8938 // EXPECT_DEATH would accept.
8939 // terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
8940 // and a return statement for ASSERT_DEATH_IF_SUPPORTED.
8941 // This ensures that ASSERT_DEATH_IF_SUPPORTED will not
8942 // compile inside functions where ASSERT_DEATH doesn't
8943 // compile.
8944 //
8945 // The branch that has an always false condition is used to ensure that
8946 // statement and regex are compiled (and thus syntactically correct) but
8947 // never executed. The unreachable code macro protects the terminator
8948 // statement from generating an 'unreachable code' warning in case
8949 // statement unconditionally returns or throws. The Message constructor at
8950 // the end allows the syntax of streaming additional messages into the
8951 // macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
8952 # define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \
8953  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8954  if (::testing::internal::AlwaysTrue()) { \
8955  GTEST_LOG_(WARNING) \
8956  << "Death tests are not supported on this platform.\n" \
8957  << "Statement '" #statement "' cannot be verified."; \
8958  } else if (::testing::internal::AlwaysFalse()) { \
8959  ::testing::internal::RE::PartialMatch(".*", (regex)); \
8960  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8961  terminator; \
8962  } else \
8963  ::testing::Message()
8964 
8965 #endif // GTEST_HAS_DEATH_TEST
8966 
8967 } // namespace internal
8968 } // namespace testing
8969 
8970 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
8971 
8972 namespace testing
8973 {
8974 
8975 // This flag controls the style of death tests. Valid values are "threadsafe",
8976 // meaning that the death test child process will re-execute the test binary
8977 // from the start, running only a single death test, or "fast",
8978 // meaning that the child process will execute the test logic immediately
8979 // after forking.
8980 GTEST_DECLARE_string_(death_test_style);
8981 
8982 #if GTEST_HAS_DEATH_TEST
8983 
8984 namespace internal
8985 {
8986 
8987 // Returns a Boolean value indicating whether the caller is currently
8988 // executing in the context of the death test child process. Tools such as
8989 // Valgrind heap checkers may need this to modify their behavior in death
8990 // tests. IMPORTANT: This is an internal utility. Using it may break the
8991 // implementation of death tests. User code MUST NOT use it.
8992 GTEST_API_ bool InDeathTestChild();
8993 
8994 } // namespace internal
8995 
8996 // The following macros are useful for writing death tests.
8997 
8998 // Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
8999 // executed:
9000 //
9001 // 1. It generates a warning if there is more than one active
9002 // thread. This is because it's safe to fork() or clone() only
9003 // when there is a single thread.
9004 //
9005 // 2. The parent process clone()s a sub-process and runs the death
9006 // test in it; the sub-process exits with code 0 at the end of the
9007 // death test, if it hasn't exited already.
9008 //
9009 // 3. The parent process waits for the sub-process to terminate.
9010 //
9011 // 4. The parent process checks the exit code and error message of
9012 // the sub-process.
9013 //
9014 // Examples:
9015 //
9016 // ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
9017 // for (int i = 0; i < 5; i++) {
9018 // EXPECT_DEATH(server.ProcessRequest(i),
9019 // "Invalid request .* in ProcessRequest()")
9020 // << "Failed to die on request " << i;
9021 // }
9022 //
9023 // ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
9024 //
9025 // bool KilledBySIGHUP(int exit_code) {
9026 // return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
9027 // }
9028 //
9029 // ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
9030 //
9031 // On the regular expressions used in death tests:
9032 //
9033 // On POSIX-compliant systems (*nix), we use the <regex.h> library,
9034 // which uses the POSIX extended regex syntax.
9035 //
9036 // On other platforms (e.g. Windows), we only support a simple regex
9037 // syntax implemented as part of Google Test. This limited
9038 // implementation should be enough most of the time when writing
9039 // death tests; though it lacks many features you can find in PCRE
9040 // or POSIX extended regex syntax. For example, we don't support
9041 // union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
9042 // repetition count ("x{5,7}"), among others.
9043 //
9044 // Below is the syntax that we do support. We chose it to be a
9045 // subset of both PCRE and POSIX extended regex, so it's easy to
9046 // learn wherever you come from. In the following: 'A' denotes a
9047 // literal character, period (.), or a single \\ escape sequence;
9048 // 'x' and 'y' denote regular expressions; 'm' and 'n' are for
9049 // natural numbers.
9050 //
9051 // c matches any literal character c
9052 // \\d matches any decimal digit
9053 // \\D matches any character that's not a decimal digit
9054 // \\f matches \f
9055 // \\n matches \n
9056 // \\r matches \r
9057 // \\s matches any ASCII whitespace, including \n
9058 // \\S matches any character that's not a whitespace
9059 // \\t matches \t
9060 // \\v matches \v
9061 // \\w matches any letter, _, or decimal digit
9062 // \\W matches any character that \\w doesn't match
9063 // \\c matches any literal character c, which must be a punctuation
9064 // . matches any single character except \n
9065 // A? matches 0 or 1 occurrences of A
9066 // A* matches 0 or many occurrences of A
9067 // A+ matches 1 or many occurrences of A
9068 // ^ matches the beginning of a string (not that of each line)
9069 // $ matches the end of a string (not that of each line)
9070 // xy matches x followed by y
9071 //
9072 // If you accidentally use PCRE or POSIX extended regex features
9073 // not implemented by us, you will get a run-time failure. In that
9074 // case, please try to rewrite your regular expression within the
9075 // above syntax.
9076 //
9077 // This implementation is *not* meant to be as highly tuned or robust
9078 // as a compiled regex library, but should perform well enough for a
9079 // death test, which already incurs significant overhead by launching
9080 // a child process.
9081 //
9082 // Known caveats:
9083 //
9084 // A "threadsafe" style death test obtains the path to the test
9085 // program from argv[0] and re-executes it in the sub-process. For
9086 // simplicity, the current implementation doesn't search the PATH
9087 // when launching the sub-process. This means that the user must
9088 // invoke the test program via a path that contains at least one
9089 // path separator (e.g. path/to/foo_test and
9090 // /absolute/path/to/bar_test are fine, but foo_test is not). This
9091 // is rarely a problem as people usually don't put the test binary
9092 // directory in PATH.
9093 //
9094 // TODO(wan@google.com): make thread-safe death tests search the PATH.
9095 
9096 // Asserts that a given statement causes the program to exit, with an
9097 // integer exit status that satisfies predicate, and emitting error output
9098 // that matches regex.
9099 # define ASSERT_EXIT(statement, predicate, regex) \
9100  GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)
9101 
9102 // Like ASSERT_EXIT, but continues on to successive tests in the
9103 // test case, if any:
9104 # define EXPECT_EXIT(statement, predicate, regex) \
9105  GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)
9106 
9107 // Asserts that a given statement causes the program to exit, either by
9108 // explicitly exiting with a nonzero exit code or being killed by a
9109 // signal, and emitting error output that matches regex.
9110 # define ASSERT_DEATH(statement, regex) \
9111  ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
9112 
9113 // Like ASSERT_DEATH, but continues on to successive tests in the
9114 // test case, if any:
9115 # define EXPECT_DEATH(statement, regex) \
9116  EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
9117 
9118 // Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
9119 
9120 // Tests that an exit code describes a normal exit with a given exit code.
9121 class GTEST_API_ ExitedWithCode
9122 {
9123 public:
9124  explicit ExitedWithCode(int exit_code);
9125  bool operator()(int exit_status) const;
9126 private:
9127  // No implementation - assignment is unsupported.
9128  void operator=(const ExitedWithCode & other);
9129 
9130  const int exit_code_;
9131 };
9132 
9133 # if !GTEST_OS_WINDOWS
9134 // Tests that an exit code describes an exit due to termination by a
9135 // given signal.
9136 class GTEST_API_ KilledBySignal
9137 {
9138 public:
9139  explicit KilledBySignal(int signum);
9140  bool operator()(int exit_status) const;
9141 private:
9142  const int signum_;
9143 };
9144 # endif // !GTEST_OS_WINDOWS
9145 
9146 // EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
9147 // The death testing framework causes this to have interesting semantics,
9148 // since the sideeffects of the call are only visible in opt mode, and not
9149 // in debug mode.
9150 //
9151 // In practice, this can be used to test functions that utilize the
9152 // LOG(DFATAL) macro using the following style:
9153 //
9154 // int DieInDebugOr12(int* sideeffect) {
9155 // if (sideeffect) {
9156 // *sideeffect = 12;
9157 // }
9158 // LOG(DFATAL) << "death";
9159 // return 12;
9160 // }
9161 //
9162 // TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {
9163 // int sideeffect = 0;
9164 // // Only asserts in dbg.
9165 // EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
9166 //
9167 // #ifdef NDEBUG
9168 // // opt-mode has sideeffect visible.
9169 // EXPECT_EQ(12, sideeffect);
9170 // #else
9171 // // dbg-mode no visible sideeffect.
9172 // EXPECT_EQ(0, sideeffect);
9173 // #endif
9174 // }
9175 //
9176 // This will assert that DieInDebugReturn12InOpt() crashes in debug
9177 // mode, usually due to a DCHECK or LOG(DFATAL), but returns the
9178 // appropriate fallback value (12 in this case) in opt mode. If you
9179 // need to test that a function has appropriate side-effects in opt
9180 // mode, include assertions against the side-effects. A general
9181 // pattern for this is:
9182 //
9183 // EXPECT_DEBUG_DEATH({
9184 // // Side-effects here will have an effect after this statement in
9185 // // opt mode, but none in debug mode.
9186 // EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
9187 // }, "death");
9188 //
9189 # ifdef NDEBUG
9190 
9191 # define EXPECT_DEBUG_DEATH(statement, regex) \
9192  GTEST_EXECUTE_STATEMENT_(statement, regex)
9193 
9194 # define ASSERT_DEBUG_DEATH(statement, regex) \
9195  GTEST_EXECUTE_STATEMENT_(statement, regex)
9196 
9197 # else
9198 
9199 # define EXPECT_DEBUG_DEATH(statement, regex) \
9200  EXPECT_DEATH(statement, regex)
9201 
9202 # define ASSERT_DEBUG_DEATH(statement, regex) \
9203  ASSERT_DEATH(statement, regex)
9204 
9205 # endif // NDEBUG for EXPECT_DEBUG_DEATH
9206 #endif // GTEST_HAS_DEATH_TEST
9207 
9208 // EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
9209 // ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
9210 // death tests are supported; otherwise they just issue a warning. This is
9211 // useful when you are combining death test assertions with normal test
9212 // assertions in one test.
9213 #if GTEST_HAS_DEATH_TEST
9214 # define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
9215  EXPECT_DEATH(statement, regex)
9216 # define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
9217  ASSERT_DEATH(statement, regex)
9218 #else
9219 # define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
9220  GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
9221 # define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
9222  GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
9223 #endif
9224 
9225 } // namespace testing
9226 
9227 #endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
9228 // This file was GENERATED by command:
9229 // pump.py gtest-param-test.h.pump
9230 // DO NOT EDIT BY HAND!!!
9231 
9232 // Copyright 2008, Google Inc.
9233 // All rights reserved.
9234 //
9235 // Redistribution and use in source and binary forms, with or without
9236 // modification, are permitted provided that the following conditions are
9237 // met:
9238 //
9239 // * Redistributions of source code must retain the above copyright
9240 // notice, this list of conditions and the following disclaimer.
9241 // * Redistributions in binary form must reproduce the above
9242 // copyright notice, this list of conditions and the following disclaimer
9243 // in the documentation and/or other materials provided with the
9244 // distribution.
9245 // * Neither the name of Google Inc. nor the names of its
9246 // contributors may be used to endorse or promote products derived from
9247 // this software without specific prior written permission.
9248 //
9249 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9250 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9251 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9252 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9253 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9254 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9255 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9256 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9257 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9258 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9259 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9260 //
9261 // Authors: vladl@google.com (Vlad Losev)
9262 //
9263 // Macros and functions for implementing parameterized tests
9264 // in Google C++ Testing Framework (Google Test)
9265 //
9266 // This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
9267 //
9268 #ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
9269 #define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
9270 
9271 
9272 // Value-parameterized tests allow you to test your code with different
9273 // parameters without writing multiple copies of the same test.
9274 //
9275 // Here is how you use value-parameterized tests:
9276 
9277 #if 0
9278 
9279 // To write value-parameterized tests, first you should define a fixture
9280 // class. It is usually derived from testing::TestWithParam<T> (see below for
9281 // another inheritance scheme that's sometimes useful in more complicated
9282 // class hierarchies), where the type of your parameter values.
9283 // TestWithParam<T> is itself derived from testing::Test. T can be any
9284 // copyable type. If it's a raw pointer, you are responsible for managing the
9285 // lifespan of the pointed values.
9286 
9287 class FooTest : public ::testing::TestWithParam<const char *>
9288 {
9289  // You can implement all the usual class fixture members here.
9290 };
9291 
9292 // Then, use the TEST_P macro to define as many parameterized tests
9293 // for this fixture as you want. The _P suffix is for "parameterized"
9294 // or "pattern", whichever you prefer to think.
9295 
9296 TEST_P(FooTest, DoesBlah)
9297 {
9298  // Inside a test, access the test parameter with the GetParam() method
9299  // of the TestWithParam<T> class:
9300  EXPECT_TRUE(foo.Blah(GetParam()));
9301  ...
9302 }
9303 
9304 TEST_P(FooTest, HasBlahBlah)
9305 {
9306  ...
9307 }
9308 
9309 // Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
9310 // case with any set of parameters you want. Google Test defines a number
9311 // of functions for generating test parameters. They return what we call
9312 // (surprise!) parameter generators. Here is a summary of them, which
9313 // are all in the testing namespace:
9314 //
9315 //
9316 // Range(begin, end [, step]) - Yields values {begin, begin+step,
9317 // begin+step+step, ...}. The values do not
9318 // include end. step defaults to 1.
9319 // Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
9320 // ValuesIn(container) - Yields values from a C-style array, an STL
9321 // ValuesIn(begin,end) container, or an iterator range [begin, end).
9322 // Bool() - Yields sequence {false, true}.
9323 // Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
9324 // for the math savvy) of the values generated
9325 // by the N generators.
9326 //
9327 // For more details, see comments at the definitions of these functions below
9328 // in this file.
9329 //
9330 // The following statement will instantiate tests from the FooTest test case
9331 // each with parameter values "meeny", "miny", and "moe".
9332 
9333 INSTANTIATE_TEST_CASE_P(InstantiationName,
9334  FooTest,
9335  Values("meeny", "miny", "moe"));
9336 
9337 // To distinguish different instances of the pattern, (yes, you
9338 // can instantiate it more then once) the first argument to the
9339 // INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
9340 // actual test case name. Remember to pick unique prefixes for different
9341 // instantiations. The tests from the instantiation above will have
9342 // these names:
9343 //
9344 // * InstantiationName/FooTest.DoesBlah/0 for "meeny"
9345 // * InstantiationName/FooTest.DoesBlah/1 for "miny"
9346 // * InstantiationName/FooTest.DoesBlah/2 for "moe"
9347 // * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
9348 // * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
9349 // * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
9350 //
9351 // You can use these names in --gtest_filter.
9352 //
9353 // This statement will instantiate all tests from FooTest again, each
9354 // with parameter values "cat" and "dog":
9355 
9356 const char * pets[] = {"cat", "dog"};
9357 INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
9358 
9359 // The tests from the instantiation above will have these names:
9360 //
9361 // * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
9362 // * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
9363 // * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
9364 // * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
9365 //
9366 // Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
9367 // in the given test case, whether their definitions come before or
9368 // AFTER the INSTANTIATE_TEST_CASE_P statement.
9369 //
9370 // Please also note that generator expressions (including parameters to the
9371 // generators) are evaluated in InitGoogleTest(), after main() has started.
9372 // This allows the user on one hand, to adjust generator parameters in order
9373 // to dynamically determine a set of tests to run and on the other hand,
9374 // give the user a chance to inspect the generated tests with Google Test
9375 // reflection API before RUN_ALL_TESTS() is executed.
9376 //
9377 // You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
9378 // for more examples.
9379 //
9380 // In the future, we plan to publish the API for defining new parameter
9381 // generators. But for now this interface remains part of the internal
9382 // implementation and is subject to change.
9383 //
9384 //
9385 // A parameterized test fixture must be derived from testing::Test and from
9386 // testing::WithParamInterface<T>, where T is the type of the parameter
9387 // values. Inheriting from TestWithParam<T> satisfies that requirement because
9388 // TestWithParam<T> inherits from both Test and WithParamInterface. In more
9389 // complicated hierarchies, however, it is occasionally useful to inherit
9390 // separately from Test and WithParamInterface. For example:
9391 
9392 class BaseTest : public ::testing::Test
9393 {
9394  // You can inherit all the usual members for a non-parameterized test
9395  // fixture here.
9396 };
9397 
9398 class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int>
9399 {
9400  // The usual test fixture members go here too.
9401 };
9402 
9403 TEST_F(BaseTest, HasFoo)
9404 {
9405  // This is an ordinary non-parameterized test.
9406 }
9407 
9408 TEST_P(DerivedTest, DoesBlah)
9409 {
9410  // GetParam works just the same here as if you inherit from TestWithParam.
9411  EXPECT_TRUE(foo.Blah(GetParam()));
9412 }
9413 
9414 #endif // 0
9415 
9416 
9417 #if !GTEST_OS_SYMBIAN
9418 # include <utility>
9419 #endif
9420 
9421 // scripts/fuse_gtest.py depends on gtest's own header being #included
9422 // *unconditionally*. Therefore these #includes cannot be moved
9423 // inside #if GTEST_HAS_PARAM_TEST.
9424 // Copyright 2008 Google Inc.
9425 // All Rights Reserved.
9426 //
9427 // Redistribution and use in source and binary forms, with or without
9428 // modification, are permitted provided that the following conditions are
9429 // met:
9430 //
9431 // * Redistributions of source code must retain the above copyright
9432 // notice, this list of conditions and the following disclaimer.
9433 // * Redistributions in binary form must reproduce the above
9434 // copyright notice, this list of conditions and the following disclaimer
9435 // in the documentation and/or other materials provided with the
9436 // distribution.
9437 // * Neither the name of Google Inc. nor the names of its
9438 // contributors may be used to endorse or promote products derived from
9439 // this software without specific prior written permission.
9440 //
9441 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9442 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9443 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9444 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9445 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9446 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9447 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9448 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9449 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9450 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9451 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9452 //
9453 // Author: vladl@google.com (Vlad Losev)
9454 
9455 // Type and function utilities for implementing parameterized tests.
9456 
9457 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
9458 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
9459 
9460 #include <iterator>
9461 #include <utility>
9462 #include <vector>
9463 
9464 // scripts/fuse_gtest.py depends on gtest's own header being #included
9465 // *unconditionally*. Therefore these #includes cannot be moved
9466 // inside #if GTEST_HAS_PARAM_TEST.
9467 // Copyright 2003 Google Inc.
9468 // All rights reserved.
9469 //
9470 // Redistribution and use in source and binary forms, with or without
9471 // modification, are permitted provided that the following conditions are
9472 // met:
9473 //
9474 // * Redistributions of source code must retain the above copyright
9475 // notice, this list of conditions and the following disclaimer.
9476 // * Redistributions in binary form must reproduce the above
9477 // copyright notice, this list of conditions and the following disclaimer
9478 // in the documentation and/or other materials provided with the
9479 // distribution.
9480 // * Neither the name of Google Inc. nor the names of its
9481 // contributors may be used to endorse or promote products derived from
9482 // this software without specific prior written permission.
9483 //
9484 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9485 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9486 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9487 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9488 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9489 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9490 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9491 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9492 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9493 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9494 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9495 //
9496 // Authors: Dan Egnor (egnor@google.com)
9497 //
9498 // A "smart" pointer type with reference tracking. Every pointer to a
9499 // particular object is kept on a circular linked list. When the last pointer
9500 // to an object is destroyed or reassigned, the object is deleted.
9501 //
9502 // Used properly, this deletes the object when the last reference goes away.
9503 // There are several caveats:
9504 // - Like all reference counting schemes, cycles lead to leaks.
9505 // - Each smart pointer is actually two pointers (8 bytes instead of 4).
9506 // - Every time a pointer is assigned, the entire list of pointers to that
9507 // object is traversed. This class is therefore NOT SUITABLE when there
9508 // will often be more than two or three pointers to a particular object.
9509 // - References are only tracked as long as linked_ptr<> objects are copied.
9510 // If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS
9511 // will happen (double deletion).
9512 //
9513 // A good use of this class is storing object references in STL containers.
9514 // You can safely put linked_ptr<> in a vector<>.
9515 // Other uses may not be as good.
9516 //
9517 // Note: If you use an incomplete type with linked_ptr<>, the class
9518 // *containing* linked_ptr<> must have a constructor and destructor (even
9519 // if they do nothing!).
9520 //
9521 // Bill Gibbons suggested we use something like this.
9522 //
9523 // Thread Safety:
9524 // Unlike other linked_ptr implementations, in this implementation
9525 // a linked_ptr object is thread-safe in the sense that:
9526 // - it's safe to copy linked_ptr objects concurrently,
9527 // - it's safe to copy *from* a linked_ptr and read its underlying
9528 // raw pointer (e.g. via get()) concurrently, and
9529 // - it's safe to write to two linked_ptrs that point to the same
9530 // shared object concurrently.
9531 // TODO(wan@google.com): rename this to safe_linked_ptr to avoid
9532 // confusion with normal linked_ptr.
9533 
9534 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
9535 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
9536 
9537 #include <stdlib.h>
9538 #include <assert.h>
9539 
9540 
9541 namespace testing
9542 {
9543 namespace internal
9544 {
9545 
9546 // Protects copying of all linked_ptr objects.
9547 GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex);
9548 
9549 // This is used internally by all instances of linked_ptr<>. It needs to be
9550 // a non-template class because different types of linked_ptr<> can refer to
9551 // the same object (linked_ptr<Superclass>(obj) vs linked_ptr<Subclass>(obj)).
9552 // So, it needs to be possible for different types of linked_ptr to participate
9553 // in the same circular linked list, so we need a single class type here.
9554 //
9555 // DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr<T>.
9556 class linked_ptr_internal
9557 {
9558 public:
9559  // Create a new circle that includes only this instance.
9560  void join_new()
9561  {
9562  next_ = this;
9563  }
9564 
9565  // Many linked_ptr operations may change p.link_ for some linked_ptr
9566  // variable p in the same circle as this object. Therefore we need
9567  // to prevent two such operations from occurring concurrently.
9568  //
9569  // Note that different types of linked_ptr objects can coexist in a
9570  // circle (e.g. linked_ptr<Base>, linked_ptr<Derived1>, and
9571  // linked_ptr<Derived2>). Therefore we must use a single mutex to
9572  // protect all linked_ptr objects. This can create serious
9573  // contention in production code, but is acceptable in a testing
9574  // framework.
9575 
9576  // Join an existing circle.
9577  void join(linked_ptr_internal const * ptr)
9578  GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex)
9579  {
9580  MutexLock lock(&g_linked_ptr_mutex);
9581 
9582  linked_ptr_internal const * p = ptr;
9583 
9584  while (p->next_ != ptr) { p = p->next_; }
9585 
9586  p->next_ = this;
9587  next_ = ptr;
9588  }
9589 
9590  // Leave whatever circle we're part of. Returns true if we were the
9591  // last member of the circle. Once this is done, you can join() another.
9592  bool depart()
9593  GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex)
9594  {
9595  MutexLock lock(&g_linked_ptr_mutex);
9596 
9597  if (next_ == this) { return true; }
9598 
9599  linked_ptr_internal const * p = next_;
9600 
9601  while (p->next_ != this) { p = p->next_; }
9602 
9603  p->next_ = next_;
9604  return false;
9605  }
9606 
9607 private:
9608  mutable linked_ptr_internal const * next_;
9609 };
9610 
9611 template <typename T>
9612 class linked_ptr
9613 {
9614 public:
9615  typedef T element_type;
9616 
9617  // Take over ownership of a raw pointer. This should happen as soon as
9618  // possible after the object is created.
9619  explicit linked_ptr(T * ptr = NULL) { capture(ptr); }
9620  ~linked_ptr() { depart(); }
9621 
9622  // Copy an existing linked_ptr<>, adding ourselves to the list of references.
9623  template <typename U> linked_ptr(linked_ptr<U> const & ptr) { copy(&ptr); }
9624  linked_ptr(linked_ptr const & ptr) // NOLINT
9625  {
9626  assert(&ptr != this);
9627  copy(&ptr);
9628  }
9629 
9630  // Assignment releases the old value and acquires the new.
9631  template <typename U> linked_ptr & operator=(linked_ptr<U> const & ptr)
9632  {
9633  depart();
9634  copy(&ptr);
9635  return *this;
9636  }
9637 
9639  {
9640  if (&ptr != this)
9641  {
9642  depart();
9643  copy(&ptr);
9644  }
9645 
9646  return *this;
9647  }
9648 
9649  // Smart pointer members.
9650  void reset(T * ptr = NULL)
9651  {
9652  depart();
9653  capture(ptr);
9654  }
9655  T * get() const { return value_; }
9656  T * operator->() const { return value_; }
9657  T & operator*() const { return *value_; }
9658 
9659  bool operator==(T * p) const { return value_ == p; }
9660  bool operator!=(T * p) const { return value_ != p; }
9661  template <typename U>
9662  bool operator==(linked_ptr<U> const & ptr) const
9663  {
9664  return value_ == ptr.get();
9665  }
9666  template <typename U>
9667  bool operator!=(linked_ptr<U> const & ptr) const
9668  {
9669  return value_ != ptr.get();
9670  }
9671 
9672 private:
9673  template <typename U>
9674  friend class linked_ptr;
9675 
9676  T * value_;
9677  linked_ptr_internal link_;
9678 
9679  void depart()
9680  {
9681  if (link_.depart()) { delete value_; }
9682  }
9683 
9684  void capture(T * ptr)
9685  {
9686  value_ = ptr;
9687  link_.join_new();
9688  }
9689 
9690  template <typename U> void copy(linked_ptr<U> const * ptr)
9691  {
9692  value_ = ptr->get();
9693 
9694  if (value_)
9695  { link_.join(&ptr->link_); }
9696 
9697  else
9698  { link_.join_new(); }
9699  }
9700 };
9701 
9702 template<typename T> inline
9703 bool operator==(T * ptr, const linked_ptr<T> & x)
9704 {
9705  return ptr == x.get();
9706 }
9707 
9708 template<typename T> inline
9709 bool operator!=(T * ptr, const linked_ptr<T> & x)
9710 {
9711  return ptr != x.get();
9712 }
9713 
9714 // A function to convert T* into linked_ptr<T>
9715 // Doing e.g. make_linked_ptr(new FooBarBaz<type>(arg)) is a shorter notation
9716 // for linked_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg))
9717 template <typename T>
9719 {
9720  return linked_ptr<T>(ptr);
9721 }
9722 
9723 } // namespace internal
9724 } // namespace testing
9725 
9726 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
9727 // Copyright 2007, Google Inc.
9728 // All rights reserved.
9729 //
9730 // Redistribution and use in source and binary forms, with or without
9731 // modification, are permitted provided that the following conditions are
9732 // met:
9733 //
9734 // * Redistributions of source code must retain the above copyright
9735 // notice, this list of conditions and the following disclaimer.
9736 // * Redistributions in binary form must reproduce the above
9737 // copyright notice, this list of conditions and the following disclaimer
9738 // in the documentation and/or other materials provided with the
9739 // distribution.
9740 // * Neither the name of Google Inc. nor the names of its
9741 // contributors may be used to endorse or promote products derived from
9742 // this software without specific prior written permission.
9743 //
9744 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9745 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9746 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9747 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9748 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9749 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9750 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9751 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9752 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9753 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9754 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9755 //
9756 // Author: wan@google.com (Zhanyong Wan)
9757 
9758 // Google Test - The Google C++ Testing Framework
9759 //
9760 // This file implements a universal value printer that can print a
9761 // value of any type T:
9762 //
9763 // void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
9764 //
9765 // A user can teach this function how to print a class type T by
9766 // defining either operator<<() or PrintTo() in the namespace that
9767 // defines T. More specifically, the FIRST defined function in the
9768 // following list will be used (assuming T is defined in namespace
9769 // foo):
9770 //
9771 // 1. foo::PrintTo(const T&, ostream*)
9772 // 2. operator<<(ostream&, const T&) defined in either foo or the
9773 // global namespace.
9774 //
9775 // If none of the above is defined, it will print the debug string of
9776 // the value if it is a protocol buffer, or print the raw bytes in the
9777 // value otherwise.
9778 //
9779 // To aid debugging: when T is a reference type, the address of the
9780 // value is also printed; when T is a (const) char pointer, both the
9781 // pointer value and the NUL-terminated string it points to are
9782 // printed.
9783 //
9784 // We also provide some convenient wrappers:
9785 //
9786 // // Prints a value to a string. For a (const or not) char
9787 // // pointer, the NUL-terminated string (but not the pointer) is
9788 // // printed.
9789 // std::string ::testing::PrintToString(const T& value);
9790 //
9791 // // Prints a value tersely: for a reference type, the referenced
9792 // // value (but not the address) is printed; for a (const or not) char
9793 // // pointer, the NUL-terminated string (but not the pointer) is
9794 // // printed.
9795 // void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
9796 //
9797 // // Prints value using the type inferred by the compiler. The difference
9798 // // from UniversalTersePrint() is that this function prints both the
9799 // // pointer and the NUL-terminated string for a (const or not) char pointer.
9800 // void ::testing::internal::UniversalPrint(const T& value, ostream*);
9801 //
9802 // // Prints the fields of a tuple tersely to a string vector, one
9803 // // element for each field. Tuple support must be enabled in
9804 // // gtest-port.h.
9805 // std::vector<string> UniversalTersePrintTupleFieldsToStrings(
9806 // const Tuple& value);
9807 //
9808 // Known limitation:
9809 //
9810 // The print primitives print the elements of an STL-style container
9811 // using the compiler-inferred type of *iter where iter is a
9812 // const_iterator of the container. When const_iterator is an input
9813 // iterator but not a forward iterator, this inferred type may not
9814 // match value_type, and the print output may be incorrect. In
9815 // practice, this is rarely a problem as for most containers
9816 // const_iterator is a forward iterator. We'll fix this if there's an
9817 // actual need for it. Note that this fix cannot rely on value_type
9818 // being defined as many user-defined container types don't have
9819 // value_type.
9820 
9821 #ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
9822 #define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
9823 
9824 #include <ostream> // NOLINT
9825 #include <sstream>
9826 #include <string>
9827 #include <utility>
9828 #include <vector>
9829 
9830 namespace testing
9831 {
9832 
9833 // Definitions in the 'internal' and 'internal2' name spaces are
9834 // subject to change without notice. DO NOT USE THEM IN USER CODE!
9835 namespace internal2
9836 {
9837 
9838 // Prints the given number of bytes in the given object to the given
9839 // ostream.
9840 GTEST_API_ void PrintBytesInObjectTo(const unsigned char * obj_bytes,
9841  size_t count,
9842  ::std::ostream * os);
9843 
9844 // For selecting which printer to use when a given type has neither <<
9845 // nor PrintTo().
9847 {
9848  kProtobuf, // a protobuf type
9849  kConvertibleToInteger, // a type implicitly convertible to BiggestInt
9850  // (e.g. a named or unnamed enum type)
9851  kOtherType // anything else
9852 };
9853 
9854 // TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called
9855 // by the universal printer to print a value of type T when neither
9856 // operator<< nor PrintTo() is defined for T, where kTypeKind is the
9857 // "kind" of T as defined by enum TypeKind.
9858 template <typename T, TypeKind kTypeKind>
9860 {
9861 public:
9862  // This default version is called when kTypeKind is kOtherType.
9863  static void PrintValue(const T & value, ::std::ostream * os)
9864  {
9865  PrintBytesInObjectTo(reinterpret_cast<const unsigned char *>(&value),
9866  sizeof(value), os);
9867  }
9868 };
9869 
9870 // We print a protobuf using its ShortDebugString() when the string
9871 // doesn't exceed this many characters; otherwise we print it using
9872 // DebugString() for better readability.
9873 const size_t kProtobufOneLinerMaxLength = 50;
9874 
9875 template <typename T>
9876 class TypeWithoutFormatter<T, kProtobuf>
9877 {
9878 public:
9879  static void PrintValue(const T & value, ::std::ostream * os)
9880  {
9881  const ::testing::internal::string short_str = value.ShortDebugString();
9883  short_str.length() <= kProtobufOneLinerMaxLength ?
9884  short_str : ("\n" + value.DebugString());
9885  *os << ("<" + pretty_str + ">");
9886  }
9887 };
9888 
9889 template <typename T>
9890 class TypeWithoutFormatter<T, kConvertibleToInteger>
9891 {
9892 public:
9893  // Since T has no << operator or PrintTo() but can be implicitly
9894  // converted to BiggestInt, we print it as a BiggestInt.
9895  //
9896  // Most likely T is an enum type (either named or unnamed), in which
9897  // case printing it as an integer is the desired behavior. In case
9898  // T is not an enum, printing it as an integer is the best we can do
9899  // given that it has no user-defined printer.
9900  static void PrintValue(const T & value, ::std::ostream * os)
9901  {
9902  const internal::BiggestInt kBigInt = value;
9903  *os << kBigInt;
9904  }
9905 };
9906 
9907 // Prints the given value to the given ostream. If the value is a
9908 // protocol message, its debug string is printed; if it's an enum or
9909 // of a type implicitly convertible to BiggestInt, it's printed as an
9910 // integer; otherwise the bytes in the value are printed. This is
9911 // what UniversalPrinter<T>::Print() does when it knows nothing about
9912 // type T and T has neither << operator nor PrintTo().
9913 //
9914 // A user can override this behavior for a class type Foo by defining
9915 // a << operator in the namespace where Foo is defined.
9916 //
9917 // We put this operator in namespace 'internal2' instead of 'internal'
9918 // to simplify the implementation, as much code in 'internal' needs to
9919 // use << in STL, which would conflict with our own << were it defined
9920 // in 'internal'.
9921 //
9922 // Note that this operator<< takes a generic std::basic_ostream<Char,
9923 // CharTraits> type instead of the more restricted std::ostream. If
9924 // we define it to take an std::ostream instead, we'll get an
9925 // "ambiguous overloads" compiler error when trying to print a type
9926 // Foo that supports streaming to std::basic_ostream<Char,
9927 // CharTraits>, as the compiler cannot tell whether
9928 // operator<<(std::ostream&, const T&) or
9929 // operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more
9930 // specific.
9931 template <typename Char, typename CharTraits, typename T>
9932 ::std::basic_ostream<Char, CharTraits> & operator<<(
9933  ::std::basic_ostream<Char, CharTraits> & os, const T & x)
9934 {
9938  kConvertibleToInteger : kOtherType) >::PrintValue(x, &os);
9939  return os;
9940 }
9941 
9942 } // namespace internal2
9943 } // namespace testing
9944 
9945 // This namespace MUST NOT BE NESTED IN ::testing, or the name look-up
9946 // magic needed for implementing UniversalPrinter won't work.
9947 namespace testing_internal
9948 {
9949 
9950 // Used to print a value that is not an STL-style container when the
9951 // user doesn't define PrintTo() for it.
9952 template <typename T>
9953 void DefaultPrintNonContainerTo(const T & value, ::std::ostream * os)
9954 {
9955  // With the following statement, during unqualified name lookup,
9956  // testing::internal2::operator<< appears as if it was declared in
9957  // the nearest enclosing namespace that contains both
9958  // ::testing_internal and ::testing::internal2, i.e. the global
9959  // namespace. For more details, refer to the C++ Standard section
9960  // 7.3.4-1 [namespace.udir]. This allows us to fall back onto
9961  // testing::internal2::operator<< in case T doesn't come with a <<
9962  // operator.
9963  //
9964  // We cannot write 'using ::testing::internal2::operator<<;', which
9965  // gcc 3.3 fails to compile due to a compiler bug.
9966  using namespace ::testing::internal2; // NOLINT
9967 
9968  // Assuming T is defined in namespace foo, in the next statement,
9969  // the compiler will consider all of:
9970  //
9971  // 1. foo::operator<< (thanks to Koenig look-up),
9972  // 2. ::operator<< (as the current namespace is enclosed in ::),
9973  // 3. testing::internal2::operator<< (thanks to the using statement above).
9974  //
9975  // The operator<< whose type matches T best will be picked.
9976  //
9977  // We deliberately allow #2 to be a candidate, as sometimes it's
9978  // impossible to define #1 (e.g. when foo is ::std, defining
9979  // anything in it is undefined behavior unless you are a compiler
9980  // vendor.).
9981  *os << value;
9982 }
9983 
9984 } // namespace testing_internal
9985 
9986 namespace testing
9987 {
9988 namespace internal
9989 {
9990 
9991 // UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
9992 // value to the given ostream. The caller must ensure that
9993 // 'ostream_ptr' is not NULL, or the behavior is undefined.
9994 //
9995 // We define UniversalPrinter as a class template (as opposed to a
9996 // function template), as we need to partially specialize it for
9997 // reference types, which cannot be done with function templates.
9998 template <typename T>
9999 class UniversalPrinter;
10000 
10001 template <typename T>
10002 void UniversalPrint(const T & value, ::std::ostream * os);
10003 
10004 // Used to print an STL-style container when the user doesn't define
10005 // a PrintTo() for it.
10006 template <typename C>
10007 void DefaultPrintTo(IsContainer /* dummy */,
10008  false_type /* is not a pointer */,
10009  const C & container, ::std::ostream * os)
10010 {
10011  const size_t kMaxCount = 32; // The maximum number of elements to print.
10012  *os << '{';
10013  size_t count = 0;
10014 
10015  for (typename C::const_iterator it = container.begin();
10016  it != container.end(); ++it, ++count)
10017  {
10018  if (count > 0)
10019  {
10020  *os << ',';
10021 
10022  if (count == kMaxCount) // Enough has been printed.
10023  {
10024  *os << " ...";
10025  break;
10026  }
10027  }
10028 
10029  *os << ' ';
10030  // We cannot call PrintTo(*it, os) here as PrintTo() doesn't
10031  // handle *it being a native array.
10032  internal::UniversalPrint(*it, os);
10033  }
10034 
10035  if (count > 0)
10036  {
10037  *os << ' ';
10038  }
10039 
10040  *os << '}';
10041 }
10042 
10043 // Used to print a pointer that is neither a char pointer nor a member
10044 // pointer, when the user doesn't define PrintTo() for it. (A member
10045 // variable pointer or member function pointer doesn't really point to
10046 // a location in the address space. Their representation is
10047 // implementation-defined. Therefore they will be printed as raw
10048 // bytes.)
10049 template <typename T>
10050 void DefaultPrintTo(IsNotContainer /* dummy */,
10051  true_type /* is a pointer */,
10052  T * p, ::std::ostream * os)
10053 {
10054  if (p == NULL)
10055  {
10056  *os << "NULL";
10057  }
10058 
10059  else
10060  {
10061  // C++ doesn't allow casting from a function pointer to any object
10062  // pointer.
10063  //
10064  // IsTrue() silences warnings: "Condition is always true",
10065  // "unreachable code".
10066  if (IsTrue(ImplicitlyConvertible<T *, const void *>::value))
10067  {
10068  // T is not a function type. We just call << to print p,
10069  // relying on ADL to pick up user-defined << for their pointer
10070  // types, if any.
10071  *os << p;
10072  }
10073 
10074  else
10075  {
10076  // T is a function type, so '*os << p' doesn't do what we want
10077  // (it just prints p as bool). We want to print p as a const
10078  // void*. However, we cannot cast it to const void* directly,
10079  // even using reinterpret_cast, as earlier versions of gcc
10080  // (e.g. 3.4.5) cannot compile the cast when p is a function
10081  // pointer. Casting to UInt64 first solves the problem.
10082  *os << reinterpret_cast<const void *>(
10083  reinterpret_cast<internal::UInt64>(p));
10084  }
10085  }
10086 }
10087 
10088 // Used to print a non-container, non-pointer value when the user
10089 // doesn't define PrintTo() for it.
10090 template <typename T>
10091 void DefaultPrintTo(IsNotContainer /* dummy */,
10092  false_type /* is not a pointer */,
10093  const T & value, ::std::ostream * os)
10094 {
10096 }
10097 
10098 // Prints the given value using the << operator if it has one;
10099 // otherwise prints the bytes in it. This is what
10100 // UniversalPrinter<T>::Print() does when PrintTo() is not specialized
10101 // or overloaded for type T.
10102 //
10103 // A user can override this behavior for a class type Foo by defining
10104 // an overload of PrintTo() in the namespace where Foo is defined. We
10105 // give the user this option as sometimes defining a << operator for
10106 // Foo is not desirable (e.g. the coding style may prevent doing it,
10107 // or there is already a << operator but it doesn't do what the user
10108 // wants).
10109 template <typename T>
10110 void PrintTo(const T & value, ::std::ostream * os)
10111 {
10112  // DefaultPrintTo() is overloaded. The type of its first two
10113  // arguments determine which version will be picked. If T is an
10114  // STL-style container, the version for container will be called; if
10115  // T is a pointer, the pointer version will be called; otherwise the
10116  // generic version will be called.
10117  //
10118  // Note that we check for container types here, prior to we check
10119  // for protocol message types in our operator<<. The rationale is:
10120  //
10121  // For protocol messages, we want to give people a chance to
10122  // override Google Mock's format by defining a PrintTo() or
10123  // operator<<. For STL containers, other formats can be
10124  // incompatible with Google Mock's format for the container
10125  // elements; therefore we check for container types here to ensure
10126  // that our format is used.
10127  //
10128  // The second argument of DefaultPrintTo() is needed to bypass a bug
10129  // in Symbian's C++ compiler that prevents it from picking the right
10130  // overload between:
10131  //
10132  // PrintTo(const T& x, ...);
10133  // PrintTo(T* x, ...);
10134  DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
10135 }
10136 
10137 // The following list of PrintTo() overloads tells
10138 // UniversalPrinter<T>::Print() how to print standard types (built-in
10139 // types, strings, plain arrays, and pointers).
10140 
10141 // Overloads for various char types.
10142 GTEST_API_ void PrintTo(unsigned char c, ::std::ostream * os);
10143 GTEST_API_ void PrintTo(signed char c, ::std::ostream * os);
10144 inline void PrintTo(char c, ::std::ostream * os)
10145 {
10146  // When printing a plain char, we always treat it as unsigned. This
10147  // way, the output won't be affected by whether the compiler thinks
10148  // char is signed or not.
10149  PrintTo(static_cast<unsigned char>(c), os);
10150 }
10151 
10152 // Overloads for other simple built-in types.
10153 inline void PrintTo(bool x, ::std::ostream * os)
10154 {
10155  *os << (x ? "true" : "false");
10156 }
10157 
10158 // Overload for wchar_t type.
10159 // Prints a wchar_t as a symbol if it is printable or as its internal
10160 // code otherwise and also as its decimal code (except for L'\0').
10161 // The L'\0' char is printed as "L'\\0'". The decimal code is printed
10162 // as signed integer when wchar_t is implemented by the compiler
10163 // as a signed type and is printed as an unsigned integer when wchar_t
10164 // is implemented as an unsigned type.
10165 GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream * os);
10166 
10167 // Overloads for C strings.
10168 GTEST_API_ void PrintTo(const char * s, ::std::ostream * os);
10169 inline void PrintTo(char * s, ::std::ostream * os)
10170 {
10171  PrintTo(ImplicitCast_<const char *>(s), os);
10172 }
10173 
10174 // signed/unsigned char is often used for representing binary data, so
10175 // we print pointers to it as void* to be safe.
10176 inline void PrintTo(const signed char * s, ::std::ostream * os)
10177 {
10178  PrintTo(ImplicitCast_<const void *>(s), os);
10179 }
10180 inline void PrintTo(signed char * s, ::std::ostream * os)
10181 {
10182  PrintTo(ImplicitCast_<const void *>(s), os);
10183 }
10184 inline void PrintTo(const unsigned char * s, ::std::ostream * os)
10185 {
10186  PrintTo(ImplicitCast_<const void *>(s), os);
10187 }
10188 inline void PrintTo(unsigned char * s, ::std::ostream * os)
10189 {
10190  PrintTo(ImplicitCast_<const void *>(s), os);
10191 }
10192 
10193 // MSVC can be configured to define wchar_t as a typedef of unsigned
10194 // short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
10195 // type. When wchar_t is a typedef, defining an overload for const
10196 // wchar_t* would cause unsigned short* be printed as a wide string,
10197 // possibly causing invalid memory accesses.
10198 #if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
10199 // Overloads for wide C strings
10200 GTEST_API_ void PrintTo(const wchar_t * s, ::std::ostream * os);
10201 inline void PrintTo(wchar_t * s, ::std::ostream * os)
10202 {
10203  PrintTo(ImplicitCast_<const wchar_t *>(s), os);
10204 }
10205 #endif
10206 
10207 // Overload for C arrays. Multi-dimensional arrays are printed
10208 // properly.
10209 
10210 // Prints the given number of elements in an array, without printing
10211 // the curly braces.
10212 template <typename T>
10213 void PrintRawArrayTo(const T a[], size_t count, ::std::ostream * os)
10214 {
10215  UniversalPrint(a[0], os);
10216 
10217  for (size_t i = 1; i != count; i++)
10218  {
10219  *os << ", ";
10220  UniversalPrint(a[i], os);
10221  }
10222 }
10223 
10224 // Overloads for ::string and ::std::string.
10225 #if GTEST_HAS_GLOBAL_STRING
10226 GTEST_API_ void PrintStringTo(const ::string & s, ::std::ostream * os);
10227 inline void PrintTo(const ::string & s, ::std::ostream * os)
10228 {
10229  PrintStringTo(s, os);
10230 }
10231 #endif // GTEST_HAS_GLOBAL_STRING
10232 
10233 GTEST_API_ void PrintStringTo(const ::std::string & s, ::std::ostream * os);
10234 inline void PrintTo(const ::std::string & s, ::std::ostream * os)
10235 {
10236  PrintStringTo(s, os);
10237 }
10238 
10239 // Overloads for ::wstring and ::std::wstring.
10240 #if GTEST_HAS_GLOBAL_WSTRING
10241 GTEST_API_ void PrintWideStringTo(const ::wstring & s, ::std::ostream * os);
10242 inline void PrintTo(const ::wstring & s, ::std::ostream * os)
10243 {
10244  PrintWideStringTo(s, os);
10245 }
10246 #endif // GTEST_HAS_GLOBAL_WSTRING
10247 
10248 #if GTEST_HAS_STD_WSTRING
10249 GTEST_API_ void PrintWideStringTo(const ::std::wstring & s, ::std::ostream * os);
10250 inline void PrintTo(const ::std::wstring & s, ::std::ostream * os)
10251 {
10252  PrintWideStringTo(s, os);
10253 }
10254 #endif // GTEST_HAS_STD_WSTRING
10255 
10256 #if GTEST_HAS_TR1_TUPLE
10257 // Overload for ::std::tr1::tuple. Needed for printing function arguments,
10258 // which are packed as tuples.
10259 
10260 // Helper function for printing a tuple. T must be instantiated with
10261 // a tuple type.
10262 template <typename T>
10263 void PrintTupleTo(const T & t, ::std::ostream * os);
10264 
10265 // Overloaded PrintTo() for tuples of various arities. We support
10266 // tuples of up-to 10 fields. The following implementation works
10267 // regardless of whether tr1::tuple is implemented using the
10268 // non-standard variadic template feature or not.
10269 
10270 inline void PrintTo(const ::std::tr1::tuple<> & t, ::std::ostream * os)
10271 {
10272  PrintTupleTo(t, os);
10273 }
10274 
10275 template <typename T1>
10276 void PrintTo(const ::std::tr1::tuple<T1> & t, ::std::ostream * os)
10277 {
10278  PrintTupleTo(t, os);
10279 }
10280 
10281 template <typename T1, typename T2>
10282 void PrintTo(const ::std::tr1::tuple<T1, T2> & t, ::std::ostream * os)
10283 {
10284  PrintTupleTo(t, os);
10285 }
10286 
10287 template <typename T1, typename T2, typename T3>
10288 void PrintTo(const ::std::tr1::tuple<T1, T2, T3> & t, ::std::ostream * os)
10289 {
10290  PrintTupleTo(t, os);
10291 }
10292 
10293 template <typename T1, typename T2, typename T3, typename T4>
10294 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4> & t, ::std::ostream * os)
10295 {
10296  PrintTupleTo(t, os);
10297 }
10298 
10299 template <typename T1, typename T2, typename T3, typename T4, typename T5>
10300 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5> & t,
10301  ::std::ostream * os)
10302 {
10303  PrintTupleTo(t, os);
10304 }
10305 
10306 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10307  typename T6>
10308 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> & t,
10309  ::std::ostream * os)
10310 {
10311  PrintTupleTo(t, os);
10312 }
10313 
10314 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10315  typename T6, typename T7>
10316 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> & t,
10317  ::std::ostream * os)
10318 {
10319  PrintTupleTo(t, os);
10320 }
10321 
10322 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10323  typename T6, typename T7, typename T8>
10324 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> & t,
10325  ::std::ostream * os)
10326 {
10327  PrintTupleTo(t, os);
10328 }
10329 
10330 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10331  typename T6, typename T7, typename T8, typename T9>
10332 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> & t,
10333  ::std::ostream * os)
10334 {
10335  PrintTupleTo(t, os);
10336 }
10337 
10338 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10339  typename T6, typename T7, typename T8, typename T9, typename T10>
10340 void PrintTo(
10341  const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> & t,
10342  ::std::ostream * os)
10343 {
10344  PrintTupleTo(t, os);
10345 }
10346 #endif // GTEST_HAS_TR1_TUPLE
10347 
10348 // Overload for std::pair.
10349 template <typename T1, typename T2>
10350 void PrintTo(const ::std::pair<T1, T2> & value, ::std::ostream * os)
10351 {
10352  *os << '(';
10353  // We cannot use UniversalPrint(value.first, os) here, as T1 may be
10354  // a reference type. The same for printing value.second.
10355  UniversalPrinter<T1>::Print(value.first, os);
10356  *os << ", ";
10357  UniversalPrinter<T2>::Print(value.second, os);
10358  *os << ')';
10359 }
10360 
10361 // Implements printing a non-reference type T by letting the compiler
10362 // pick the right overload of PrintTo() for T.
10363 template <typename T>
10364 class UniversalPrinter
10365 {
10366 public:
10367  // MSVC warns about adding const to a function type, so we want to
10368  // disable the warning.
10369 #ifdef _MSC_VER
10370 # pragma warning(push) // Saves the current warning state.
10371 # pragma warning(disable:4180) // Temporarily disables warning 4180.
10372 #endif // _MSC_VER
10373 
10374  // Note: we deliberately don't call this PrintTo(), as that name
10375  // conflicts with ::testing::internal::PrintTo in the body of the
10376  // function.
10377  static void Print(const T & value, ::std::ostream * os)
10378  {
10379  // By default, ::testing::internal::PrintTo() is used for printing
10380  // the value.
10381  //
10382  // Thanks to Koenig look-up, if T is a class and has its own
10383  // PrintTo() function defined in its namespace, that function will
10384  // be visible here. Since it is more specific than the generic ones
10385  // in ::testing::internal, it will be picked by the compiler in the
10386  // following statement - exactly what we want.
10387  PrintTo(value, os);
10388  }
10389 
10390 #ifdef _MSC_VER
10391 # pragma warning(pop) // Restores the warning state.
10392 #endif // _MSC_VER
10393 };
10394 
10395 // UniversalPrintArray(begin, len, os) prints an array of 'len'
10396 // elements, starting at address 'begin'.
10397 template <typename T>
10398 void UniversalPrintArray(const T * begin, size_t len, ::std::ostream * os)
10399 {
10400  if (len == 0)
10401  {
10402  *os << "{}";
10403  }
10404 
10405  else
10406  {
10407  *os << "{ ";
10408  const size_t kThreshold = 18;
10409  const size_t kChunkSize = 8;
10410 
10411  // If the array has more than kThreshold elements, we'll have to
10412  // omit some details by printing only the first and the last
10413  // kChunkSize elements.
10414  // TODO(wan@google.com): let the user control the threshold using a flag.
10415  if (len <= kThreshold)
10416  {
10417  PrintRawArrayTo(begin, len, os);
10418  }
10419 
10420  else
10421  {
10422  PrintRawArrayTo(begin, kChunkSize, os);
10423  *os << ", ..., ";
10424  PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
10425  }
10426 
10427  *os << " }";
10428  }
10429 }
10430 // This overload prints a (const) char array compactly.
10432  const char * begin, size_t len, ::std::ostream * os);
10433 
10434 // This overload prints a (const) wchar_t array compactly.
10436  const wchar_t * begin, size_t len, ::std::ostream * os);
10437 
10438 // Implements printing an array type T[N].
10439 template <typename T, size_t N>
10440 class UniversalPrinter<T[N]>
10441 {
10442 public:
10443  // Prints the given array, omitting some elements when there are too
10444  // many.
10445  static void Print(const T(&a)[N], ::std::ostream * os)
10446  {
10447  UniversalPrintArray(a, N, os);
10448  }
10449 };
10450 
10451 // Implements printing a reference type T&.
10452 template <typename T>
10453 class UniversalPrinter<T &>
10454 {
10455 public:
10456  // MSVC warns about adding const to a function type, so we want to
10457  // disable the warning.
10458 #ifdef _MSC_VER
10459 # pragma warning(push) // Saves the current warning state.
10460 # pragma warning(disable:4180) // Temporarily disables warning 4180.
10461 #endif // _MSC_VER
10462 
10463  static void Print(const T & value, ::std::ostream * os)
10464  {
10465  // Prints the address of the value. We use reinterpret_cast here
10466  // as static_cast doesn't compile when T is a function type.
10467  *os << "@" << reinterpret_cast<const void *>(&value) << " ";
10468 
10469  // Then prints the value itself.
10470  UniversalPrint(value, os);
10471  }
10472 
10473 #ifdef _MSC_VER
10474 # pragma warning(pop) // Restores the warning state.
10475 #endif // _MSC_VER
10476 };
10477 
10478 // Prints a value tersely: for a reference type, the referenced value
10479 // (but not the address) is printed; for a (const) char pointer, the
10480 // NUL-terminated string (but not the pointer) is printed.
10481 
10482 template <typename T>
10484 {
10485 public:
10486  static void Print(const T & value, ::std::ostream * os)
10487  {
10488  UniversalPrint(value, os);
10489  }
10490 };
10491 template <typename T>
10492 class UniversalTersePrinter<T &>
10493 {
10494 public:
10495  static void Print(const T & value, ::std::ostream * os)
10496  {
10497  UniversalPrint(value, os);
10498  }
10499 };
10500 template <typename T, size_t N>
10501 class UniversalTersePrinter<T[N]>
10502 {
10503 public:
10504  static void Print(const T(&value)[N], ::std::ostream * os)
10505  {
10506  UniversalPrinter<T[N]>::Print(value, os);
10507  }
10508 };
10509 template <>
10510 class UniversalTersePrinter<const char *>
10511 {
10512 public:
10513  static void Print(const char * str, ::std::ostream * os)
10514  {
10515  if (str == NULL)
10516  {
10517  *os << "NULL";
10518  }
10519 
10520  else
10521  {
10522  UniversalPrint(string(str), os);
10523  }
10524  }
10525 };
10526 template <>
10527 class UniversalTersePrinter<char *>
10528 {
10529 public:
10530  static void Print(char * str, ::std::ostream * os)
10531  {
10533  }
10534 };
10535 
10536 #if GTEST_HAS_STD_WSTRING
10537 template <>
10538 class UniversalTersePrinter<const wchar_t *>
10539 {
10540 public:
10541  static void Print(const wchar_t * str, ::std::ostream * os)
10542  {
10543  if (str == NULL)
10544  {
10545  *os << "NULL";
10546  }
10547 
10548  else
10549  {
10550  UniversalPrint(::std::wstring(str), os);
10551  }
10552  }
10553 };
10554 #endif
10555 
10556 template <>
10557 class UniversalTersePrinter<wchar_t *>
10558 {
10559 public:
10560  static void Print(wchar_t * str, ::std::ostream * os)
10561  {
10563  }
10564 };
10565 
10566 template <typename T>
10567 void UniversalTersePrint(const T & value, ::std::ostream * os)
10568 {
10570 }
10571 
10572 // Prints a value using the type inferred by the compiler. The
10573 // difference between this and UniversalTersePrint() is that for a
10574 // (const) char pointer, this prints both the pointer and the
10575 // NUL-terminated string.
10576 template <typename T>
10577 void UniversalPrint(const T & value, ::std::ostream * os)
10578 {
10579  // A workarond for the bug in VC++ 7.1 that prevents us from instantiating
10580  // UniversalPrinter with T directly.
10581  typedef T T1;
10582  UniversalPrinter<T1>::Print(value, os);
10583 }
10584 
10585 #if GTEST_HAS_TR1_TUPLE
10586 typedef ::std::vector<string> Strings;
10587 
10588 // This helper template allows PrintTo() for tuples and
10589 // UniversalTersePrintTupleFieldsToStrings() to be defined by
10590 // induction on the number of tuple fields. The idea is that
10591 // TuplePrefixPrinter<N>::PrintPrefixTo(t, os) prints the first N
10592 // fields in tuple t, and can be defined in terms of
10593 // TuplePrefixPrinter<N - 1>.
10594 
10595 // The inductive case.
10596 template <size_t N>
10597 struct TuplePrefixPrinter
10598 {
10599  // Prints the first N fields of a tuple.
10600  template <typename Tuple>
10601  static void PrintPrefixTo(const Tuple & t, ::std::ostream * os)
10602  {
10603  TuplePrefixPrinter < N - 1 >::PrintPrefixTo(t, os);
10604  *os << ", ";
10605  UniversalPrinter < typename ::std::tr1::tuple_element < N - 1, Tuple >::type >
10606  ::Print(::std::tr1::get < N - 1 > (t), os);
10607  }
10608 
10609  // Tersely prints the first N fields of a tuple to a string vector,
10610  // one element for each field.
10611  template <typename Tuple>
10612  static void TersePrintPrefixToStrings(const Tuple & t, Strings * strings)
10613  {
10614  TuplePrefixPrinter < N - 1 >::TersePrintPrefixToStrings(t, strings);
10615  ::std::stringstream ss;
10616  UniversalTersePrint(::std::tr1::get < N - 1 > (t), &ss);
10617  strings->push_back(ss.str());
10618  }
10619 };
10620 
10621 // Base cases.
10622 template <>
10623 struct TuplePrefixPrinter<0>
10624 {
10625  template <typename Tuple>
10626  static void PrintPrefixTo(const Tuple &, ::std::ostream *) {}
10627 
10628  template <typename Tuple>
10629  static void TersePrintPrefixToStrings(const Tuple &, Strings *) {}
10630 };
10631 // We have to specialize the entire TuplePrefixPrinter<> class
10632 // template here, even though the definition of
10633 // TersePrintPrefixToStrings() is the same as the generic version, as
10634 // Embarcadero (formerly CodeGear, formerly Borland) C++ doesn't
10635 // support specializing a method template of a class template.
10636 template <>
10637 struct TuplePrefixPrinter<1>
10638 {
10639  template <typename Tuple>
10640  static void PrintPrefixTo(const Tuple & t, ::std::ostream * os)
10641  {
10643  Print(::std::tr1::get<0>(t), os);
10644  }
10645 
10646  template <typename Tuple>
10647  static void TersePrintPrefixToStrings(const Tuple & t, Strings * strings)
10648  {
10649  ::std::stringstream ss;
10650  UniversalTersePrint(::std::tr1::get<0>(t), &ss);
10651  strings->push_back(ss.str());
10652  }
10653 };
10654 
10655 // Helper function for printing a tuple. T must be instantiated with
10656 // a tuple type.
10657 template <typename T>
10658 void PrintTupleTo(const T & t, ::std::ostream * os)
10659 {
10660  *os << "(";
10662  PrintPrefixTo(t, os);
10663  *os << ")";
10664 }
10665 
10666 // Prints the fields of a tuple tersely to a string vector, one
10667 // element for each field. See the comment before
10668 // UniversalTersePrint() for how we define "tersely".
10669 template <typename Tuple>
10670 Strings UniversalTersePrintTupleFieldsToStrings(const Tuple & value)
10671 {
10672  Strings result;
10674  TersePrintPrefixToStrings(value, &result);
10675  return result;
10676 }
10677 #endif // GTEST_HAS_TR1_TUPLE
10678 
10679 } // namespace internal
10680 
10681 template <typename T>
10682 ::std::string PrintToString(const T & value)
10683 {
10684  ::std::stringstream ss;
10686  return ss.str();
10687 }
10688 
10689 } // namespace testing
10690 
10691 #endif // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
10692 
10693 #if GTEST_HAS_PARAM_TEST
10694 
10695 namespace testing
10696 {
10697 namespace internal
10698 {
10699 
10700 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
10701 //
10702 // Outputs a message explaining invalid registration of different
10703 // fixture class for the same test case. This may happen when
10704 // TEST_P macro is used to define two tests with the same name
10705 // but in different namespaces.
10706 GTEST_API_ void ReportInvalidTestCaseType(const char * test_case_name,
10707  const char * file, int line);
10708 
10709 template <typename> class ParamGeneratorInterface;
10710 template <typename> class ParamGenerator;
10711 
10712 // Interface for iterating over elements provided by an implementation
10713 // of ParamGeneratorInterface<T>.
10714 template <typename T>
10716 {
10717 public:
10719  // A pointer to the base generator instance.
10720  // Used only for the purposes of iterator comparison
10721  // to make sure that two iterators belong to the same generator.
10722  virtual const ParamGeneratorInterface<T> * BaseGenerator() const = 0;
10723  // Advances iterator to point to the next element
10724  // provided by the generator. The caller is responsible
10725  // for not calling Advance() on an iterator equal to
10726  // BaseGenerator()->End().
10727  virtual void Advance() = 0;
10728  // Clones the iterator object. Used for implementing copy semantics
10729  // of ParamIterator<T>.
10730  virtual ParamIteratorInterface * Clone() const = 0;
10731  // Dereferences the current iterator and provides (read-only) access
10732  // to the pointed value. It is the caller's responsibility not to call
10733  // Current() on an iterator equal to BaseGenerator()->End().
10734  // Used for implementing ParamGenerator<T>::operator*().
10735  virtual const T * Current() const = 0;
10736  // Determines whether the given iterator and other point to the same
10737  // element in the sequence generated by the generator.
10738  // Used for implementing ParamGenerator<T>::operator==().
10739  virtual bool Equals(const ParamIteratorInterface & other) const = 0;
10740 };
10741 
10742 // Class iterating over elements provided by an implementation of
10743 // ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T>
10744 // and implements the const forward iterator concept.
10745 template <typename T>
10746 class ParamIterator
10747 {
10748 public:
10749  typedef T value_type;
10750  typedef const T & reference;
10751  typedef ptrdiff_t difference_type;
10752 
10753  // ParamIterator assumes ownership of the impl_ pointer.
10754  ParamIterator(const ParamIterator & other) : impl_(other.impl_->Clone()) {}
10756  {
10757  if (this != &other)
10758  { impl_.reset(other.impl_->Clone()); }
10759 
10760  return *this;
10761  }
10762 
10763  const T & operator*() const { return *impl_->Current(); }
10764  const T * operator->() const { return impl_->Current(); }
10765  // Prefix version of operator++.
10767  {
10768  impl_->Advance();
10769  return *this;
10770  }
10771  // Postfix version of operator++.
10772  ParamIterator operator++(int /*unused*/)
10773  {
10774  ParamIteratorInterface<T> * clone = impl_->Clone();
10775  impl_->Advance();
10776  return ParamIterator(clone);
10777  }
10778  bool operator==(const ParamIterator & other) const
10779  {
10780  return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_);
10781  }
10782  bool operator!=(const ParamIterator & other) const
10783  {
10784  return !(*this == other);
10785  }
10786 
10787 private:
10788  friend class ParamGenerator<T>;
10789  explicit ParamIterator(ParamIteratorInterface<T> * impl) : impl_(impl) {}
10791 };
10792 
10793 // ParamGeneratorInterface<T> is the binary interface to access generators
10794 // defined in other translation units.
10795 template <typename T>
10797 {
10798 public:
10799  typedef T ParamType;
10800 
10802 
10803  // Generator interface definition
10804  virtual ParamIteratorInterface<T> * Begin() const = 0;
10805  virtual ParamIteratorInterface<T> * End() const = 0;
10806 };
10807 
10808 // Wraps ParamGeneratorInterface<T> and provides general generator syntax
10809 // compatible with the STL Container concept.
10810 // This class implements copy initialization semantics and the contained
10811 // ParamGeneratorInterface<T> instance is shared among all copies
10812 // of the original object. This is possible because that instance is immutable.
10813 template<typename T>
10814 class ParamGenerator
10815 {
10816 public:
10818 
10819  explicit ParamGenerator(ParamGeneratorInterface<T> * impl) : impl_(impl) {}
10820  ParamGenerator(const ParamGenerator & other) : impl_(other.impl_) {}
10821 
10823  {
10824  impl_ = other.impl_;
10825  return *this;
10826  }
10827 
10828  iterator begin() const { return iterator(impl_->Begin()); }
10829  iterator end() const { return iterator(impl_->End()); }
10830 
10831 private:
10833 };
10834 
10835 // Generates values from a range of two comparable values. Can be used to
10836 // generate sequences of user-defined types that implement operator+() and
10837 // operator<().
10838 // This class is used in the Range() function.
10839 template <typename T, typename IncrementT>
10840 class RangeGenerator : public ParamGeneratorInterface<T>
10841 {
10842 public:
10843  RangeGenerator(T begin, T end, IncrementT step)
10844  : begin_(begin), end_(end),
10845  step_(step), end_index_(CalculateEndIndex(begin, end, step)) {}
10846  virtual ~RangeGenerator() {}
10847 
10849  {
10850  return new Iterator(this, begin_, 0, step_);
10851  }
10852  virtual ParamIteratorInterface<T> * End() const
10853  {
10854  return new Iterator(this, end_, end_index_, step_);
10855  }
10856 
10857 private:
10858  class Iterator : public ParamIteratorInterface<T>
10859  {
10860  public:
10861  Iterator(const ParamGeneratorInterface<T> * base, T value, int index,
10862  IncrementT step)
10863  : base_(base), value_(value), index_(index), step_(step) {}
10864  virtual ~Iterator() {}
10865 
10867  {
10868  return base_;
10869  }
10870  virtual void Advance()
10871  {
10872  value_ = value_ + step_;
10873  index_++;
10874  }
10876  {
10877  return new Iterator(*this);
10878  }
10879  virtual const T * Current() const { return &value_; }
10880  virtual bool Equals(const ParamIteratorInterface<T> & other) const
10881  {
10882  // Having the same base generator guarantees that the other
10883  // iterator is of the same type and we can downcast.
10884  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
10885  << "The program attempted to compare iterators "
10886  << "from different generators." << std::endl;
10887  const int other_index =
10888  CheckedDowncastToActualType<const Iterator>(&other)->index_;
10889  return index_ == other_index;
10890  }
10891 
10892  private:
10893  Iterator(const Iterator & other)
10894  : ParamIteratorInterface<T>(),
10895  base_(other.base_), value_(other.value_), index_(other.index_),
10896  step_(other.step_) {}
10897 
10898  // No implementation - assignment is unsupported.
10899  void operator=(const Iterator & other);
10900 
10901  const ParamGeneratorInterface<T> * const base_;
10902  T value_;
10903  int index_;
10904  const IncrementT step_;
10905  }; // class RangeGenerator::Iterator
10906 
10907  static int CalculateEndIndex(const T & begin,
10908  const T & end,
10909  const IncrementT & step)
10910  {
10911  int end_index = 0;
10912 
10913  for (T i = begin; i < end; i = i + step)
10914  { end_index++; }
10915 
10916  return end_index;
10917  }
10918 
10919  // No implementation - assignment is unsupported.
10920  void operator=(const RangeGenerator & other);
10921 
10922  const T begin_;
10923  const T end_;
10924  const IncrementT step_;
10925  // The index for the end() iterator. All the elements in the generated
10926  // sequence are indexed (0-based) to aid iterator comparison.
10927  const int end_index_;
10928 }; // class RangeGenerator
10929 
10930 
10931 // Generates values from a pair of STL-style iterators. Used in the
10932 // ValuesIn() function. The elements are copied from the source range
10933 // since the source can be located on the stack, and the generator
10934 // is likely to persist beyond that stack frame.
10935 template <typename T>
10937 {
10938 public:
10939  template <typename ForwardIterator>
10940  ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)
10941  : container_(begin, end) {}
10943 
10945  {
10946  return new Iterator(this, container_.begin());
10947  }
10948  virtual ParamIteratorInterface<T> * End() const
10949  {
10950  return new Iterator(this, container_.end());
10951  }
10952 
10953 private:
10954  typedef typename ::std::vector<T> ContainerType;
10955 
10956  class Iterator : public ParamIteratorInterface<T>
10957  {
10958  public:
10960  typename ContainerType::const_iterator iterator)
10961  : base_(base), iterator_(iterator) {}
10962  virtual ~Iterator() {}
10963 
10965  {
10966  return base_;
10967  }
10968  virtual void Advance()
10969  {
10970  ++iterator_;
10971  value_.reset();
10972  }
10974  {
10975  return new Iterator(*this);
10976  }
10977  // We need to use cached value referenced by iterator_ because *iterator_
10978  // can return a temporary object (and of type other then T), so just
10979  // having "return &*iterator_;" doesn't work.
10980  // value_ is updated here and not in Advance() because Advance()
10981  // can advance iterator_ beyond the end of the range, and we cannot
10982  // detect that fact. The client code, on the other hand, is
10983  // responsible for not calling Current() on an out-of-range iterator.
10984  virtual const T * Current() const
10985  {
10986  if (value_.get() == NULL)
10987  { value_.reset(new T(*iterator_)); }
10988 
10989  return value_.get();
10990  }
10991  virtual bool Equals(const ParamIteratorInterface<T> & other) const
10992  {
10993  // Having the same base generator guarantees that the other
10994  // iterator is of the same type and we can downcast.
10995  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
10996  << "The program attempted to compare iterators "
10997  << "from different generators." << std::endl;
10998  return iterator_ ==
10999  CheckedDowncastToActualType<const Iterator>(&other)->iterator_;
11000  }
11001 
11002  private:
11003  Iterator(const Iterator & other)
11004  // The explicit constructor call suppresses a false warning
11005  // emitted by gcc when supplied with the -Wextra option.
11006  : ParamIteratorInterface<T>(),
11007  base_(other.base_),
11008  iterator_(other.iterator_) {}
11009 
11010  const ParamGeneratorInterface<T> * const base_;
11011  typename ContainerType::const_iterator iterator_;
11012  // A cached value of *iterator_. We keep it here to allow access by
11013  // pointer in the wrapping iterator's operator->().
11014  // value_ needs to be mutable to be accessed in Current().
11015  // Use of scoped_ptr helps manage cached value's lifetime,
11016  // which is bound by the lifespan of the iterator itself.
11017  mutable scoped_ptr<const T> value_;
11018  }; // class ValuesInIteratorRangeGenerator::Iterator
11019 
11020  // No implementation - assignment is unsupported.
11021  void operator=(const ValuesInIteratorRangeGenerator & other);
11022 
11023  const ContainerType container_;
11024 }; // class ValuesInIteratorRangeGenerator
11025 
11026 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
11027 //
11028 // Stores a parameter value and later creates tests parameterized with that
11029 // value.
11030 template <class TestClass>
11032 {
11033 public:
11034  typedef typename TestClass::ParamType ParamType;
11035  explicit ParameterizedTestFactory(ParamType parameter) :
11036  parameter_(parameter) {}
11037  virtual Test * CreateTest()
11038  {
11039  TestClass::SetParam(&parameter_);
11040  return new TestClass();
11041  }
11042 
11043 private:
11044  const ParamType parameter_;
11045 
11047 };
11048 
11049 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
11050 //
11051 // TestMetaFactoryBase is a base class for meta-factories that create
11052 // test factories for passing into MakeAndRegisterTestInfo function.
11053 template <class ParamType>
11054 class TestMetaFactoryBase
11055 {
11056 public:
11058 
11059  virtual TestFactoryBase * CreateTestFactory(ParamType parameter) = 0;
11060 };
11061 
11062 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
11063 //
11064 // TestMetaFactory creates test factories for passing into
11065 // MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives
11066 // ownership of test factory pointer, same factory object cannot be passed
11067 // into that method twice. But ParameterizedTestCaseInfo is going to call
11068 // it for each Test/Parameter value combination. Thus it needs meta factory
11069 // creator class.
11070 template <class TestCase>
11071 class TestMetaFactory
11072  : public TestMetaFactoryBase<typename TestCase::ParamType>
11073 {
11074 public:
11075  typedef typename TestCase::ParamType ParamType;
11076 
11078 
11079  virtual TestFactoryBase * CreateTestFactory(ParamType parameter)
11080  {
11081  return new ParameterizedTestFactory<TestCase>(parameter);
11082  }
11083 
11084 private:
11086 };
11087 
11088 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
11089 //
11090 // ParameterizedTestCaseInfoBase is a generic interface
11091 // to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase
11092 // accumulates test information provided by TEST_P macro invocations
11093 // and generators provided by INSTANTIATE_TEST_CASE_P macro invocations
11094 // and uses that information to register all resulting test instances
11095 // in RegisterTests method. The ParameterizeTestCaseRegistry class holds
11096 // a collection of pointers to the ParameterizedTestCaseInfo objects
11097 // and calls RegisterTests() on each of them when asked.
11099 {
11100 public:
11102 
11103  // Base part of test case name for display purposes.
11104  virtual const string & GetTestCaseName() const = 0;
11105  // Test case id to verify identity.
11106  virtual TypeId GetTestCaseTypeId() const = 0;
11107  // UnitTest class invokes this method to register tests in this
11108  // test case right before running them in RUN_ALL_TESTS macro.
11109  // This method should not be called more then once on any single
11110  // instance of a ParameterizedTestCaseInfoBase derived class.
11111  virtual void RegisterTests() = 0;
11112 
11113 protected:
11115 
11116 private:
11118 };
11119 
11120 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
11121 //
11122 // ParameterizedTestCaseInfo accumulates tests obtained from TEST_P
11123 // macro invocations for a particular test case and generators
11124 // obtained from INSTANTIATE_TEST_CASE_P macro invocations for that
11125 // test case. It registers tests with all values generated by all
11126 // generators when asked.
11127 template <class TestCase>
11129 {
11130 public:
11131  // ParamType and GeneratorCreationFunc are private types but are required
11132  // for declarations of public methods AddTestPattern() and
11133  // AddTestCaseInstantiation().
11134  typedef typename TestCase::ParamType ParamType;
11135  // A function that returns an instance of appropriate generator type.
11136  typedef ParamGenerator<ParamType>(GeneratorCreationFunc)();
11137 
11138  explicit ParameterizedTestCaseInfo(const char * name)
11139  : test_case_name_(name) {}
11140 
11141  // Test case base name for display purposes.
11142  virtual const string & GetTestCaseName() const { return test_case_name_; }
11143  // Test case id to verify identity.
11144  virtual TypeId GetTestCaseTypeId() const { return GetTypeId<TestCase>(); }
11145  // TEST_P macro uses AddTestPattern() to record information
11146  // about a single test in a LocalTestInfo structure.
11147  // test_case_name is the base name of the test case (without invocation
11148  // prefix). test_base_name is the name of an individual test without
11149  // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
11150  // test case base name and DoBar is test base name.
11151  void AddTestPattern(const char * test_case_name,
11152  const char * test_base_name,
11153  TestMetaFactoryBase<ParamType> * meta_factory)
11154  {
11155  tests_.push_back(linked_ptr<TestInfo>(new TestInfo(test_case_name,
11156  test_base_name,
11157  meta_factory)));
11158  }
11159  // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information
11160  // about a generator.
11161  int AddTestCaseInstantiation(const string & instantiation_name,
11162  GeneratorCreationFunc * func,
11163  const char * /* file */,
11164  int /* line */)
11165  {
11166  instantiations_.push_back(::std::make_pair(instantiation_name, func));
11167  return 0; // Return value used only to run this method in namespace scope.
11168  }
11169  // UnitTest class invokes this method to register tests in this test case
11170  // test cases right before running tests in RUN_ALL_TESTS macro.
11171  // This method should not be called more then once on any single
11172  // instance of a ParameterizedTestCaseInfoBase derived class.
11173  // UnitTest has a guard to prevent from calling this method more then once.
11174  virtual void RegisterTests()
11175  {
11176  for (typename TestInfoContainer::iterator test_it = tests_.begin();
11177  test_it != tests_.end(); ++test_it)
11178  {
11179  linked_ptr<TestInfo> test_info = *test_it;
11180 
11181  for (typename InstantiationContainer::iterator gen_it =
11182  instantiations_.begin(); gen_it != instantiations_.end();
11183  ++gen_it)
11184  {
11185  const string & instantiation_name = gen_it->first;
11186  ParamGenerator<ParamType> generator((*gen_it->second)());
11187 
11188  string test_case_name;
11189 
11190  if (!instantiation_name.empty())
11191  { test_case_name = instantiation_name + "/"; }
11192 
11193  test_case_name += test_info->test_case_base_name;
11194 
11195  int i = 0;
11196 
11197  for (typename ParamGenerator<ParamType>::iterator param_it =
11198  generator.begin();
11199  param_it != generator.end(); ++param_it, ++i)
11200  {
11201  Message test_name_stream;
11202  test_name_stream << test_info->test_base_name << "/" << i;
11204  test_case_name.c_str(),
11205  test_name_stream.GetString().c_str(),
11206  NULL, // No type parameter.
11207  PrintToString(*param_it).c_str(),
11208  GetTestCaseTypeId(),
11209  TestCase::SetUpTestCase,
11210  TestCase::TearDownTestCase,
11211  test_info->test_meta_factory->CreateTestFactory(*param_it));
11212  } // for param_it
11213  } // for gen_it
11214  } // for test_it
11215  } // RegisterTests
11216 
11217 private:
11218  // LocalTestInfo structure keeps information about a single test registered
11219  // with TEST_P macro.
11220  struct TestInfo
11221  {
11222  TestInfo(const char * a_test_case_base_name,
11223  const char * a_test_base_name,
11224  TestMetaFactoryBase<ParamType> * a_test_meta_factory) :
11225  test_case_base_name(a_test_case_base_name),
11226  test_base_name(a_test_base_name),
11227  test_meta_factory(a_test_meta_factory) {}
11228 
11229  const string test_case_base_name;
11230  const string test_base_name;
11231  const scoped_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;
11232  };
11233  typedef ::std::vector<linked_ptr<TestInfo> > TestInfoContainer;
11234  // Keeps pairs of <Instantiation name, Sequence generator creation function>
11235  // received from INSTANTIATE_TEST_CASE_P macros.
11236  typedef ::std::vector<std::pair<string, GeneratorCreationFunc *> >
11238 
11239  const string test_case_name_;
11240  TestInfoContainer tests_;
11241  InstantiationContainer instantiations_;
11242 
11244 }; // class ParameterizedTestCaseInfo
11245 
11246 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
11247 //
11248 // ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase
11249 // classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P
11250 // macros use it to locate their corresponding ParameterizedTestCaseInfo
11251 // descriptors.
11253 {
11254 public:
11257  {
11258  for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
11259  it != test_case_infos_.end(); ++it)
11260  {
11261  delete *it;
11262  }
11263  }
11264 
11265  // Looks up or creates and returns a structure containing information about
11266  // tests and instantiations of a particular test case.
11267  template <class TestCase>
11269  const char * test_case_name,
11270  const char * file,
11271  int line)
11272  {
11273  ParameterizedTestCaseInfo<TestCase> * typed_test_info = NULL;
11274 
11275  for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
11276  it != test_case_infos_.end(); ++it)
11277  {
11278  if ((*it)->GetTestCaseName() == test_case_name)
11279  {
11280  if ((*it)->GetTestCaseTypeId() != GetTypeId<TestCase>())
11281  {
11282  // Complain about incorrect usage of Google Test facilities
11283  // and terminate the program since we cannot guaranty correct
11284  // test case setup and tear-down in this case.
11285  ReportInvalidTestCaseType(test_case_name, file, line);
11286  posix::Abort();
11287  }
11288 
11289  else
11290  {
11291  // At this point we are sure that the object we found is of the same
11292  // type we are looking for, so we downcast it to that type
11293  // without further checks.
11294  typed_test_info = CheckedDowncastToActualType <
11296  }
11297 
11298  break;
11299  }
11300  }
11301 
11302  if (typed_test_info == NULL)
11303  {
11304  typed_test_info = new ParameterizedTestCaseInfo<TestCase>(test_case_name);
11305  test_case_infos_.push_back(typed_test_info);
11306  }
11307 
11308  return typed_test_info;
11309  }
11311  {
11312  for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
11313  it != test_case_infos_.end(); ++it)
11314  {
11315  (*it)->RegisterTests();
11316  }
11317  }
11318 
11319 private:
11320  typedef ::std::vector<ParameterizedTestCaseInfoBase *> TestCaseInfoContainer;
11321 
11322  TestCaseInfoContainer test_case_infos_;
11323 
11325 };
11326 
11327 } // namespace internal
11328 } // namespace testing
11329 
11330 #endif // GTEST_HAS_PARAM_TEST
11331 
11332 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
11333 // This file was GENERATED by command:
11334 // pump.py gtest-param-util-generated.h.pump
11335 // DO NOT EDIT BY HAND!!!
11336 
11337 // Copyright 2008 Google Inc.
11338 // All Rights Reserved.
11339 //
11340 // Redistribution and use in source and binary forms, with or without
11341 // modification, are permitted provided that the following conditions are
11342 // met:
11343 //
11344 // * Redistributions of source code must retain the above copyright
11345 // notice, this list of conditions and the following disclaimer.
11346 // * Redistributions in binary form must reproduce the above
11347 // copyright notice, this list of conditions and the following disclaimer
11348 // in the documentation and/or other materials provided with the
11349 // distribution.
11350 // * Neither the name of Google Inc. nor the names of its
11351 // contributors may be used to endorse or promote products derived from
11352 // this software without specific prior written permission.
11353 //
11354 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11355 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11356 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11357 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11358 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11359 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11360 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11361 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11362 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11363 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11364 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11365 //
11366 // Author: vladl@google.com (Vlad Losev)
11367 
11368 // Type and function utilities for implementing parameterized tests.
11369 // This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
11370 //
11371 // Currently Google Test supports at most 50 arguments in Values,
11372 // and at most 10 arguments in Combine. Please contact
11373 // googletestframework@googlegroups.com if you need more.
11374 // Please note that the number of arguments to Combine is limited
11375 // by the maximum arity of the implementation of tr1::tuple which is
11376 // currently set at 10.
11377 
11378 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
11379 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
11380 
11381 // scripts/fuse_gtest.py depends on gtest's own header being #included
11382 // *unconditionally*. Therefore these #includes cannot be moved
11383 // inside #if GTEST_HAS_PARAM_TEST.
11384 
11385 #if GTEST_HAS_PARAM_TEST
11386 
11387 namespace testing
11388 {
11389 
11390 // Forward declarations of ValuesIn(), which is implemented in
11391 // include/gtest/gtest-param-test.h.
11392 template <typename ForwardIterator>
11393 internal::ParamGenerator <
11394 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type >
11395 ValuesIn(ForwardIterator begin, ForwardIterator end);
11396 
11397 template <typename T, size_t N>
11398 internal::ParamGenerator<T> ValuesIn(const T(&array)[N]);
11399 
11400 template <class Container>
11401 internal::ParamGenerator<typename Container::value_type> ValuesIn(
11402  const Container & container);
11403 
11404 namespace internal
11405 {
11406 
11407 // Used in the Values() function to provide polymorphic capabilities.
11408 template <typename T1>
11409 class ValueArray1
11410 {
11411 public:
11412  explicit ValueArray1(T1 v1) : v1_(v1) {}
11413 
11414  template <typename T>
11415  operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); }
11416 
11417 private:
11418  // No implementation - assignment is unsupported.
11419  void operator=(const ValueArray1 & other);
11420 
11421  const T1 v1_;
11422 };
11423 
11424 template <typename T1, typename T2>
11425 class ValueArray2
11426 {
11427 public:
11428  ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {}
11429 
11430  template <typename T>
11431  operator ParamGenerator<T>() const
11432  {
11433  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_)};
11434  return ValuesIn(array);
11435  }
11436 
11437 private:
11438  // No implementation - assignment is unsupported.
11439  void operator=(const ValueArray2 & other);
11440 
11441  const T1 v1_;
11442  const T2 v2_;
11443 };
11444 
11445 template <typename T1, typename T2, typename T3>
11446 class ValueArray3
11447 {
11448 public:
11449  ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {}
11450 
11451  template <typename T>
11452  operator ParamGenerator<T>() const
11453  {
11454  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11455  static_cast<T>(v3_)
11456  };
11457  return ValuesIn(array);
11458  }
11459 
11460 private:
11461  // No implementation - assignment is unsupported.
11462  void operator=(const ValueArray3 & other);
11463 
11464  const T1 v1_;
11465  const T2 v2_;
11466  const T3 v3_;
11467 };
11468 
11469 template <typename T1, typename T2, typename T3, typename T4>
11470 class ValueArray4
11471 {
11472 public:
11473  ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3),
11474  v4_(v4) {}
11475 
11476  template <typename T>
11477  operator ParamGenerator<T>() const
11478  {
11479  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11480  static_cast<T>(v3_), static_cast<T>(v4_)
11481  };
11482  return ValuesIn(array);
11483  }
11484 
11485 private:
11486  // No implementation - assignment is unsupported.
11487  void operator=(const ValueArray4 & other);
11488 
11489  const T1 v1_;
11490  const T2 v2_;
11491  const T3 v3_;
11492  const T4 v4_;
11493 };
11494 
11495 template <typename T1, typename T2, typename T3, typename T4, typename T5>
11496 class ValueArray5
11497 {
11498 public:
11499  ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3),
11500  v4_(v4), v5_(v5) {}
11501 
11502  template <typename T>
11503  operator ParamGenerator<T>() const
11504  {
11505  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11506  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_)
11507  };
11508  return ValuesIn(array);
11509  }
11510 
11511 private:
11512  // No implementation - assignment is unsupported.
11513  void operator=(const ValueArray5 & other);
11514 
11515  const T1 v1_;
11516  const T2 v2_;
11517  const T3 v3_;
11518  const T4 v4_;
11519  const T5 v5_;
11520 };
11521 
11522 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11523  typename T6>
11524 class ValueArray6
11525 {
11526 public:
11527  ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2),
11528  v3_(v3), v4_(v4), v5_(v5), v6_(v6) {}
11529 
11530  template <typename T>
11531  operator ParamGenerator<T>() const
11532  {
11533  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11534  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11535  static_cast<T>(v6_)
11536  };
11537  return ValuesIn(array);
11538  }
11539 
11540 private:
11541  // No implementation - assignment is unsupported.
11542  void operator=(const ValueArray6 & other);
11543 
11544  const T1 v1_;
11545  const T2 v2_;
11546  const T3 v3_;
11547  const T4 v4_;
11548  const T5 v5_;
11549  const T6 v6_;
11550 };
11551 
11552 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11553  typename T6, typename T7>
11554 class ValueArray7
11555 {
11556 public:
11557  ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1),
11558  v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {}
11559 
11560  template <typename T>
11561  operator ParamGenerator<T>() const
11562  {
11563  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11564  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11565  static_cast<T>(v6_), static_cast<T>(v7_)
11566  };
11567  return ValuesIn(array);
11568  }
11569 
11570 private:
11571  // No implementation - assignment is unsupported.
11572  void operator=(const ValueArray7 & other);
11573 
11574  const T1 v1_;
11575  const T2 v2_;
11576  const T3 v3_;
11577  const T4 v4_;
11578  const T5 v5_;
11579  const T6 v6_;
11580  const T7 v7_;
11581 };
11582 
11583 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11584  typename T6, typename T7, typename T8>
11585 class ValueArray8
11586 {
11587 public:
11588  ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
11589  T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
11590  v8_(v8) {}
11591 
11592  template <typename T>
11593  operator ParamGenerator<T>() const
11594  {
11595  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11596  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11597  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_)
11598  };
11599  return ValuesIn(array);
11600  }
11601 
11602 private:
11603  // No implementation - assignment is unsupported.
11604  void operator=(const ValueArray8 & other);
11605 
11606  const T1 v1_;
11607  const T2 v2_;
11608  const T3 v3_;
11609  const T4 v4_;
11610  const T5 v5_;
11611  const T6 v6_;
11612  const T7 v7_;
11613  const T8 v8_;
11614 };
11615 
11616 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11617  typename T6, typename T7, typename T8, typename T9>
11618 class ValueArray9
11619 {
11620 public:
11621  ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
11622  T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
11623  v8_(v8), v9_(v9) {}
11624 
11625  template <typename T>
11626  operator ParamGenerator<T>() const
11627  {
11628  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11629  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11630  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11631  static_cast<T>(v9_)
11632  };
11633  return ValuesIn(array);
11634  }
11635 
11636 private:
11637  // No implementation - assignment is unsupported.
11638  void operator=(const ValueArray9 & other);
11639 
11640  const T1 v1_;
11641  const T2 v2_;
11642  const T3 v3_;
11643  const T4 v4_;
11644  const T5 v5_;
11645  const T6 v6_;
11646  const T7 v7_;
11647  const T8 v8_;
11648  const T9 v9_;
11649 };
11650 
11651 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11652  typename T6, typename T7, typename T8, typename T9, typename T10>
11653 class ValueArray10
11654 {
11655 public:
11656  ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11657  T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
11658  v8_(v8), v9_(v9), v10_(v10) {}
11659 
11660  template <typename T>
11661  operator ParamGenerator<T>() const
11662  {
11663  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11664  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11665  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11666  static_cast<T>(v9_), static_cast<T>(v10_)
11667  };
11668  return ValuesIn(array);
11669  }
11670 
11671 private:
11672  // No implementation - assignment is unsupported.
11673  void operator=(const ValueArray10 & other);
11674 
11675  const T1 v1_;
11676  const T2 v2_;
11677  const T3 v3_;
11678  const T4 v4_;
11679  const T5 v5_;
11680  const T6 v6_;
11681  const T7 v7_;
11682  const T8 v8_;
11683  const T9 v9_;
11684  const T10 v10_;
11685 };
11686 
11687 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11688  typename T6, typename T7, typename T8, typename T9, typename T10,
11689  typename T11>
11690 class ValueArray11
11691 {
11692 public:
11693  ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11694  T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
11695  v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {}
11696 
11697  template <typename T>
11698  operator ParamGenerator<T>() const
11699  {
11700  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11701  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11702  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11703  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_)
11704  };
11705  return ValuesIn(array);
11706  }
11707 
11708 private:
11709  // No implementation - assignment is unsupported.
11710  void operator=(const ValueArray11 & other);
11711 
11712  const T1 v1_;
11713  const T2 v2_;
11714  const T3 v3_;
11715  const T4 v4_;
11716  const T5 v5_;
11717  const T6 v6_;
11718  const T7 v7_;
11719  const T8 v8_;
11720  const T9 v9_;
11721  const T10 v10_;
11722  const T11 v11_;
11723 };
11724 
11725 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11726  typename T6, typename T7, typename T8, typename T9, typename T10,
11727  typename T11, typename T12>
11728 class ValueArray12
11729 {
11730 public:
11731  ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11732  T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
11733  v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {}
11734 
11735  template <typename T>
11736  operator ParamGenerator<T>() const
11737  {
11738  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11739  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11740  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11741  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11742  static_cast<T>(v12_)
11743  };
11744  return ValuesIn(array);
11745  }
11746 
11747 private:
11748  // No implementation - assignment is unsupported.
11749  void operator=(const ValueArray12 & other);
11750 
11751  const T1 v1_;
11752  const T2 v2_;
11753  const T3 v3_;
11754  const T4 v4_;
11755  const T5 v5_;
11756  const T6 v6_;
11757  const T7 v7_;
11758  const T8 v8_;
11759  const T9 v9_;
11760  const T10 v10_;
11761  const T11 v11_;
11762  const T12 v12_;
11763 };
11764 
11765 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11766  typename T6, typename T7, typename T8, typename T9, typename T10,
11767  typename T11, typename T12, typename T13>
11768 class ValueArray13
11769 {
11770 public:
11771  ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11772  T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
11773  v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
11774  v12_(v12), v13_(v13) {}
11775 
11776  template <typename T>
11777  operator ParamGenerator<T>() const
11778  {
11779  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11780  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11781  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11782  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11783  static_cast<T>(v12_), static_cast<T>(v13_)
11784  };
11785  return ValuesIn(array);
11786  }
11787 
11788 private:
11789  // No implementation - assignment is unsupported.
11790  void operator=(const ValueArray13 & other);
11791 
11792  const T1 v1_;
11793  const T2 v2_;
11794  const T3 v3_;
11795  const T4 v4_;
11796  const T5 v5_;
11797  const T6 v6_;
11798  const T7 v7_;
11799  const T8 v8_;
11800  const T9 v9_;
11801  const T10 v10_;
11802  const T11 v11_;
11803  const T12 v12_;
11804  const T13 v13_;
11805 };
11806 
11807 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11808  typename T6, typename T7, typename T8, typename T9, typename T10,
11809  typename T11, typename T12, typename T13, typename T14>
11810 class ValueArray14
11811 {
11812 public:
11813  ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11814  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3),
11815  v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
11816  v11_(v11), v12_(v12), v13_(v13), v14_(v14) {}
11817 
11818  template <typename T>
11819  operator ParamGenerator<T>() const
11820  {
11821  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11822  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11823  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11824  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11825  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_)
11826  };
11827  return ValuesIn(array);
11828  }
11829 
11830 private:
11831  // No implementation - assignment is unsupported.
11832  void operator=(const ValueArray14 & other);
11833 
11834  const T1 v1_;
11835  const T2 v2_;
11836  const T3 v3_;
11837  const T4 v4_;
11838  const T5 v5_;
11839  const T6 v6_;
11840  const T7 v7_;
11841  const T8 v8_;
11842  const T9 v9_;
11843  const T10 v10_;
11844  const T11 v11_;
11845  const T12 v12_;
11846  const T13 v13_;
11847  const T14 v14_;
11848 };
11849 
11850 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11851  typename T6, typename T7, typename T8, typename T9, typename T10,
11852  typename T11, typename T12, typename T13, typename T14, typename T15>
11853 class ValueArray15
11854 {
11855 public:
11856  ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11857  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2),
11858  v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
11859  v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {}
11860 
11861  template <typename T>
11862  operator ParamGenerator<T>() const
11863  {
11864  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11865  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11866  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11867  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11868  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11869  static_cast<T>(v15_)
11870  };
11871  return ValuesIn(array);
11872  }
11873 
11874 private:
11875  // No implementation - assignment is unsupported.
11876  void operator=(const ValueArray15 & other);
11877 
11878  const T1 v1_;
11879  const T2 v2_;
11880  const T3 v3_;
11881  const T4 v4_;
11882  const T5 v5_;
11883  const T6 v6_;
11884  const T7 v7_;
11885  const T8 v8_;
11886  const T9 v9_;
11887  const T10 v10_;
11888  const T11 v11_;
11889  const T12 v12_;
11890  const T13 v13_;
11891  const T14 v14_;
11892  const T15 v15_;
11893 };
11894 
11895 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11896  typename T6, typename T7, typename T8, typename T9, typename T10,
11897  typename T11, typename T12, typename T13, typename T14, typename T15,
11898  typename T16>
11899 class ValueArray16
11900 {
11901 public:
11902  ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11903  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1),
11904  v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
11905  v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
11906  v16_(v16) {}
11907 
11908  template <typename T>
11909  operator ParamGenerator<T>() const
11910  {
11911  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11912  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11913  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11914  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11915  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11916  static_cast<T>(v15_), static_cast<T>(v16_)
11917  };
11918  return ValuesIn(array);
11919  }
11920 
11921 private:
11922  // No implementation - assignment is unsupported.
11923  void operator=(const ValueArray16 & other);
11924 
11925  const T1 v1_;
11926  const T2 v2_;
11927  const T3 v3_;
11928  const T4 v4_;
11929  const T5 v5_;
11930  const T6 v6_;
11931  const T7 v7_;
11932  const T8 v8_;
11933  const T9 v9_;
11934  const T10 v10_;
11935  const T11 v11_;
11936  const T12 v12_;
11937  const T13 v13_;
11938  const T14 v14_;
11939  const T15 v15_;
11940  const T16 v16_;
11941 };
11942 
11943 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11944  typename T6, typename T7, typename T8, typename T9, typename T10,
11945  typename T11, typename T12, typename T13, typename T14, typename T15,
11946  typename T16, typename T17>
11947 class ValueArray17
11948 {
11949 public:
11950  ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11951  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
11952  T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
11953  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
11954  v15_(v15), v16_(v16), v17_(v17) {}
11955 
11956  template <typename T>
11957  operator ParamGenerator<T>() const
11958  {
11959  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11960  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11961  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11962  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11963  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11964  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_)
11965  };
11966  return ValuesIn(array);
11967  }
11968 
11969 private:
11970  // No implementation - assignment is unsupported.
11971  void operator=(const ValueArray17 & other);
11972 
11973  const T1 v1_;
11974  const T2 v2_;
11975  const T3 v3_;
11976  const T4 v4_;
11977  const T5 v5_;
11978  const T6 v6_;
11979  const T7 v7_;
11980  const T8 v8_;
11981  const T9 v9_;
11982  const T10 v10_;
11983  const T11 v11_;
11984  const T12 v12_;
11985  const T13 v13_;
11986  const T14 v14_;
11987  const T15 v15_;
11988  const T16 v16_;
11989  const T17 v17_;
11990 };
11991 
11992 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11993  typename T6, typename T7, typename T8, typename T9, typename T10,
11994  typename T11, typename T12, typename T13, typename T14, typename T15,
11995  typename T16, typename T17, typename T18>
11996 class ValueArray18
11997 {
11998 public:
11999  ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12000  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12001  T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
12002  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
12003  v15_(v15), v16_(v16), v17_(v17), v18_(v18) {}
12004 
12005  template <typename T>
12006  operator ParamGenerator<T>() const
12007  {
12008  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12009  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12010  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12011  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12012  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12013  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12014  static_cast<T>(v18_)
12015  };
12016  return ValuesIn(array);
12017  }
12018 
12019 private:
12020  // No implementation - assignment is unsupported.
12021  void operator=(const ValueArray18 & other);
12022 
12023  const T1 v1_;
12024  const T2 v2_;
12025  const T3 v3_;
12026  const T4 v4_;
12027  const T5 v5_;
12028  const T6 v6_;
12029  const T7 v7_;
12030  const T8 v8_;
12031  const T9 v9_;
12032  const T10 v10_;
12033  const T11 v11_;
12034  const T12 v12_;
12035  const T13 v13_;
12036  const T14 v14_;
12037  const T15 v15_;
12038  const T16 v16_;
12039  const T17 v17_;
12040  const T18 v18_;
12041 };
12042 
12043 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12044  typename T6, typename T7, typename T8, typename T9, typename T10,
12045  typename T11, typename T12, typename T13, typename T14, typename T15,
12046  typename T16, typename T17, typename T18, typename T19>
12047 class ValueArray19
12048 {
12049 public:
12050  ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12051  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12052  T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
12053  v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
12054  v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {}
12055 
12056  template <typename T>
12057  operator ParamGenerator<T>() const
12058  {
12059  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12060  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12061  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12062  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12063  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12064  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12065  static_cast<T>(v18_), static_cast<T>(v19_)
12066  };
12067  return ValuesIn(array);
12068  }
12069 
12070 private:
12071  // No implementation - assignment is unsupported.
12072  void operator=(const ValueArray19 & other);
12073 
12074  const T1 v1_;
12075  const T2 v2_;
12076  const T3 v3_;
12077  const T4 v4_;
12078  const T5 v5_;
12079  const T6 v6_;
12080  const T7 v7_;
12081  const T8 v8_;
12082  const T9 v9_;
12083  const T10 v10_;
12084  const T11 v11_;
12085  const T12 v12_;
12086  const T13 v13_;
12087  const T14 v14_;
12088  const T15 v15_;
12089  const T16 v16_;
12090  const T17 v17_;
12091  const T18 v18_;
12092  const T19 v19_;
12093 };
12094 
12095 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12096  typename T6, typename T7, typename T8, typename T9, typename T10,
12097  typename T11, typename T12, typename T13, typename T14, typename T15,
12098  typename T16, typename T17, typename T18, typename T19, typename T20>
12099 class ValueArray20
12100 {
12101 public:
12102  ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12103  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12104  T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
12105  v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
12106  v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
12107  v19_(v19), v20_(v20) {}
12108 
12109  template <typename T>
12110  operator ParamGenerator<T>() const
12111  {
12112  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12113  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12114  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12115  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12116  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12117  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12118  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_)
12119  };
12120  return ValuesIn(array);
12121  }
12122 
12123 private:
12124  // No implementation - assignment is unsupported.
12125  void operator=(const ValueArray20 & other);
12126 
12127  const T1 v1_;
12128  const T2 v2_;
12129  const T3 v3_;
12130  const T4 v4_;
12131  const T5 v5_;
12132  const T6 v6_;
12133  const T7 v7_;
12134  const T8 v8_;
12135  const T9 v9_;
12136  const T10 v10_;
12137  const T11 v11_;
12138  const T12 v12_;
12139  const T13 v13_;
12140  const T14 v14_;
12141  const T15 v15_;
12142  const T16 v16_;
12143  const T17 v17_;
12144  const T18 v18_;
12145  const T19 v19_;
12146  const T20 v20_;
12147 };
12148 
12149 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12150  typename T6, typename T7, typename T8, typename T9, typename T10,
12151  typename T11, typename T12, typename T13, typename T14, typename T15,
12152  typename T16, typename T17, typename T18, typename T19, typename T20,
12153  typename T21>
12154 class ValueArray21
12155 {
12156 public:
12157  ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12158  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12159  T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
12160  v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
12161  v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
12162  v18_(v18), v19_(v19), v20_(v20), v21_(v21) {}
12163 
12164  template <typename T>
12165  operator ParamGenerator<T>() const
12166  {
12167  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12168  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12169  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12170  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12171  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12172  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12173  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12174  static_cast<T>(v21_)
12175  };
12176  return ValuesIn(array);
12177  }
12178 
12179 private:
12180  // No implementation - assignment is unsupported.
12181  void operator=(const ValueArray21 & other);
12182 
12183  const T1 v1_;
12184  const T2 v2_;
12185  const T3 v3_;
12186  const T4 v4_;
12187  const T5 v5_;
12188  const T6 v6_;
12189  const T7 v7_;
12190  const T8 v8_;
12191  const T9 v9_;
12192  const T10 v10_;
12193  const T11 v11_;
12194  const T12 v12_;
12195  const T13 v13_;
12196  const T14 v14_;
12197  const T15 v15_;
12198  const T16 v16_;
12199  const T17 v17_;
12200  const T18 v18_;
12201  const T19 v19_;
12202  const T20 v20_;
12203  const T21 v21_;
12204 };
12205 
12206 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12207  typename T6, typename T7, typename T8, typename T9, typename T10,
12208  typename T11, typename T12, typename T13, typename T14, typename T15,
12209  typename T16, typename T17, typename T18, typename T19, typename T20,
12210  typename T21, typename T22>
12211 class ValueArray22
12212 {
12213 public:
12214  ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12215  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12216  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3),
12217  v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
12218  v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
12219  v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {}
12220 
12221  template <typename T>
12222  operator ParamGenerator<T>() const
12223  {
12224  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12225  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12226  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12227  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12228  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12229  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12230  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12231  static_cast<T>(v21_), static_cast<T>(v22_)
12232  };
12233  return ValuesIn(array);
12234  }
12235 
12236 private:
12237  // No implementation - assignment is unsupported.
12238  void operator=(const ValueArray22 & other);
12239 
12240  const T1 v1_;
12241  const T2 v2_;
12242  const T3 v3_;
12243  const T4 v4_;
12244  const T5 v5_;
12245  const T6 v6_;
12246  const T7 v7_;
12247  const T8 v8_;
12248  const T9 v9_;
12249  const T10 v10_;
12250  const T11 v11_;
12251  const T12 v12_;
12252  const T13 v13_;
12253  const T14 v14_;
12254  const T15 v15_;
12255  const T16 v16_;
12256  const T17 v17_;
12257  const T18 v18_;
12258  const T19 v19_;
12259  const T20 v20_;
12260  const T21 v21_;
12261  const T22 v22_;
12262 };
12263 
12264 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12265  typename T6, typename T7, typename T8, typename T9, typename T10,
12266  typename T11, typename T12, typename T13, typename T14, typename T15,
12267  typename T16, typename T17, typename T18, typename T19, typename T20,
12268  typename T21, typename T22, typename T23>
12269 class ValueArray23
12270 {
12271 public:
12272  ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12273  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12274  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2),
12275  v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
12276  v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
12277  v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
12278  v23_(v23) {}
12279 
12280  template <typename T>
12281  operator ParamGenerator<T>() const
12282  {
12283  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12284  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12285  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12286  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12287  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12288  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12289  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12290  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_)
12291  };
12292  return ValuesIn(array);
12293  }
12294 
12295 private:
12296  // No implementation - assignment is unsupported.
12297  void operator=(const ValueArray23 & other);
12298 
12299  const T1 v1_;
12300  const T2 v2_;
12301  const T3 v3_;
12302  const T4 v4_;
12303  const T5 v5_;
12304  const T6 v6_;
12305  const T7 v7_;
12306  const T8 v8_;
12307  const T9 v9_;
12308  const T10 v10_;
12309  const T11 v11_;
12310  const T12 v12_;
12311  const T13 v13_;
12312  const T14 v14_;
12313  const T15 v15_;
12314  const T16 v16_;
12315  const T17 v17_;
12316  const T18 v18_;
12317  const T19 v19_;
12318  const T20 v20_;
12319  const T21 v21_;
12320  const T22 v22_;
12321  const T23 v23_;
12322 };
12323 
12324 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12325  typename T6, typename T7, typename T8, typename T9, typename T10,
12326  typename T11, typename T12, typename T13, typename T14, typename T15,
12327  typename T16, typename T17, typename T18, typename T19, typename T20,
12328  typename T21, typename T22, typename T23, typename T24>
12329 class ValueArray24
12330 {
12331 public:
12332  ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12333  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12334  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1),
12335  v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
12336  v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
12337  v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
12338  v22_(v22), v23_(v23), v24_(v24) {}
12339 
12340  template <typename T>
12341  operator ParamGenerator<T>() const
12342  {
12343  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12344  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12345  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12346  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12347  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12348  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12349  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12350  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12351  static_cast<T>(v24_)
12352  };
12353  return ValuesIn(array);
12354  }
12355 
12356 private:
12357  // No implementation - assignment is unsupported.
12358  void operator=(const ValueArray24 & other);
12359 
12360  const T1 v1_;
12361  const T2 v2_;
12362  const T3 v3_;
12363  const T4 v4_;
12364  const T5 v5_;
12365  const T6 v6_;
12366  const T7 v7_;
12367  const T8 v8_;
12368  const T9 v9_;
12369  const T10 v10_;
12370  const T11 v11_;
12371  const T12 v12_;
12372  const T13 v13_;
12373  const T14 v14_;
12374  const T15 v15_;
12375  const T16 v16_;
12376  const T17 v17_;
12377  const T18 v18_;
12378  const T19 v19_;
12379  const T20 v20_;
12380  const T21 v21_;
12381  const T22 v22_;
12382  const T23 v23_;
12383  const T24 v24_;
12384 };
12385 
12386 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12387  typename T6, typename T7, typename T8, typename T9, typename T10,
12388  typename T11, typename T12, typename T13, typename T14, typename T15,
12389  typename T16, typename T17, typename T18, typename T19, typename T20,
12390  typename T21, typename T22, typename T23, typename T24, typename T25>
12391 class ValueArray25
12392 {
12393 public:
12394  ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12395  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12396  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
12397  T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
12398  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
12399  v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
12400  v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {}
12401 
12402  template <typename T>
12403  operator ParamGenerator<T>() const
12404  {
12405  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12406  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12407  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12408  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12409  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12410  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12411  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12412  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12413  static_cast<T>(v24_), static_cast<T>(v25_)
12414  };
12415  return ValuesIn(array);
12416  }
12417 
12418 private:
12419  // No implementation - assignment is unsupported.
12420  void operator=(const ValueArray25 & other);
12421 
12422  const T1 v1_;
12423  const T2 v2_;
12424  const T3 v3_;
12425  const T4 v4_;
12426  const T5 v5_;
12427  const T6 v6_;
12428  const T7 v7_;
12429  const T8 v8_;
12430  const T9 v9_;
12431  const T10 v10_;
12432  const T11 v11_;
12433  const T12 v12_;
12434  const T13 v13_;
12435  const T14 v14_;
12436  const T15 v15_;
12437  const T16 v16_;
12438  const T17 v17_;
12439  const T18 v18_;
12440  const T19 v19_;
12441  const T20 v20_;
12442  const T21 v21_;
12443  const T22 v22_;
12444  const T23 v23_;
12445  const T24 v24_;
12446  const T25 v25_;
12447 };
12448 
12449 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12450  typename T6, typename T7, typename T8, typename T9, typename T10,
12451  typename T11, typename T12, typename T13, typename T14, typename T15,
12452  typename T16, typename T17, typename T18, typename T19, typename T20,
12453  typename T21, typename T22, typename T23, typename T24, typename T25,
12454  typename T26>
12455 class ValueArray26
12456 {
12457 public:
12458  ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12459  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12460  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12461  T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
12462  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
12463  v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
12464  v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {}
12465 
12466  template <typename T>
12467  operator ParamGenerator<T>() const
12468  {
12469  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12470  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12471  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12472  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12473  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12474  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12475  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12476  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12477  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_)
12478  };
12479  return ValuesIn(array);
12480  }
12481 
12482 private:
12483  // No implementation - assignment is unsupported.
12484  void operator=(const ValueArray26 & other);
12485 
12486  const T1 v1_;
12487  const T2 v2_;
12488  const T3 v3_;
12489  const T4 v4_;
12490  const T5 v5_;
12491  const T6 v6_;
12492  const T7 v7_;
12493  const T8 v8_;
12494  const T9 v9_;
12495  const T10 v10_;
12496  const T11 v11_;
12497  const T12 v12_;
12498  const T13 v13_;
12499  const T14 v14_;
12500  const T15 v15_;
12501  const T16 v16_;
12502  const T17 v17_;
12503  const T18 v18_;
12504  const T19 v19_;
12505  const T20 v20_;
12506  const T21 v21_;
12507  const T22 v22_;
12508  const T23 v23_;
12509  const T24 v24_;
12510  const T25 v25_;
12511  const T26 v26_;
12512 };
12513 
12514 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12515  typename T6, typename T7, typename T8, typename T9, typename T10,
12516  typename T11, typename T12, typename T13, typename T14, typename T15,
12517  typename T16, typename T17, typename T18, typename T19, typename T20,
12518  typename T21, typename T22, typename T23, typename T24, typename T25,
12519  typename T26, typename T27>
12520 class ValueArray27
12521 {
12522 public:
12523  ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12524  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12525  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12526  T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
12527  v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
12528  v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
12529  v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
12530  v26_(v26), v27_(v27) {}
12531 
12532  template <typename T>
12533  operator ParamGenerator<T>() const
12534  {
12535  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12536  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12537  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12538  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12539  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12540  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12541  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12542  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12543  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12544  static_cast<T>(v27_)
12545  };
12546  return ValuesIn(array);
12547  }
12548 
12549 private:
12550  // No implementation - assignment is unsupported.
12551  void operator=(const ValueArray27 & other);
12552 
12553  const T1 v1_;
12554  const T2 v2_;
12555  const T3 v3_;
12556  const T4 v4_;
12557  const T5 v5_;
12558  const T6 v6_;
12559  const T7 v7_;
12560  const T8 v8_;
12561  const T9 v9_;
12562  const T10 v10_;
12563  const T11 v11_;
12564  const T12 v12_;
12565  const T13 v13_;
12566  const T14 v14_;
12567  const T15 v15_;
12568  const T16 v16_;
12569  const T17 v17_;
12570  const T18 v18_;
12571  const T19 v19_;
12572  const T20 v20_;
12573  const T21 v21_;
12574  const T22 v22_;
12575  const T23 v23_;
12576  const T24 v24_;
12577  const T25 v25_;
12578  const T26 v26_;
12579  const T27 v27_;
12580 };
12581 
12582 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12583  typename T6, typename T7, typename T8, typename T9, typename T10,
12584  typename T11, typename T12, typename T13, typename T14, typename T15,
12585  typename T16, typename T17, typename T18, typename T19, typename T20,
12586  typename T21, typename T22, typename T23, typename T24, typename T25,
12587  typename T26, typename T27, typename T28>
12588 class ValueArray28
12589 {
12590 public:
12591  ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12592  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12593  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12594  T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
12595  v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
12596  v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
12597  v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
12598  v25_(v25), v26_(v26), v27_(v27), v28_(v28) {}
12599 
12600  template <typename T>
12601  operator ParamGenerator<T>() const
12602  {
12603  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12604  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12605  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12606  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12607  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12608  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12609  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12610  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12611  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12612  static_cast<T>(v27_), static_cast<T>(v28_)
12613  };
12614  return ValuesIn(array);
12615  }
12616 
12617 private:
12618  // No implementation - assignment is unsupported.
12619  void operator=(const ValueArray28 & other);
12620 
12621  const T1 v1_;
12622  const T2 v2_;
12623  const T3 v3_;
12624  const T4 v4_;
12625  const T5 v5_;
12626  const T6 v6_;
12627  const T7 v7_;
12628  const T8 v8_;
12629  const T9 v9_;
12630  const T10 v10_;
12631  const T11 v11_;
12632  const T12 v12_;
12633  const T13 v13_;
12634  const T14 v14_;
12635  const T15 v15_;
12636  const T16 v16_;
12637  const T17 v17_;
12638  const T18 v18_;
12639  const T19 v19_;
12640  const T20 v20_;
12641  const T21 v21_;
12642  const T22 v22_;
12643  const T23 v23_;
12644  const T24 v24_;
12645  const T25 v25_;
12646  const T26 v26_;
12647  const T27 v27_;
12648  const T28 v28_;
12649 };
12650 
12651 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12652  typename T6, typename T7, typename T8, typename T9, typename T10,
12653  typename T11, typename T12, typename T13, typename T14, typename T15,
12654  typename T16, typename T17, typename T18, typename T19, typename T20,
12655  typename T21, typename T22, typename T23, typename T24, typename T25,
12656  typename T26, typename T27, typename T28, typename T29>
12657 class ValueArray29
12658 {
12659 public:
12660  ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12661  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12662  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12663  T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
12664  v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
12665  v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
12666  v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
12667  v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {}
12668 
12669  template <typename T>
12670  operator ParamGenerator<T>() const
12671  {
12672  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12673  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12674  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12675  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12676  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12677  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12678  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12679  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12680  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12681  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_)
12682  };
12683  return ValuesIn(array);
12684  }
12685 
12686 private:
12687  // No implementation - assignment is unsupported.
12688  void operator=(const ValueArray29 & other);
12689 
12690  const T1 v1_;
12691  const T2 v2_;
12692  const T3 v3_;
12693  const T4 v4_;
12694  const T5 v5_;
12695  const T6 v6_;
12696  const T7 v7_;
12697  const T8 v8_;
12698  const T9 v9_;
12699  const T10 v10_;
12700  const T11 v11_;
12701  const T12 v12_;
12702  const T13 v13_;
12703  const T14 v14_;
12704  const T15 v15_;
12705  const T16 v16_;
12706  const T17 v17_;
12707  const T18 v18_;
12708  const T19 v19_;
12709  const T20 v20_;
12710  const T21 v21_;
12711  const T22 v22_;
12712  const T23 v23_;
12713  const T24 v24_;
12714  const T25 v25_;
12715  const T26 v26_;
12716  const T27 v27_;
12717  const T28 v28_;
12718  const T29 v29_;
12719 };
12720 
12721 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12722  typename T6, typename T7, typename T8, typename T9, typename T10,
12723  typename T11, typename T12, typename T13, typename T14, typename T15,
12724  typename T16, typename T17, typename T18, typename T19, typename T20,
12725  typename T21, typename T22, typename T23, typename T24, typename T25,
12726  typename T26, typename T27, typename T28, typename T29, typename T30>
12727 class ValueArray30
12728 {
12729 public:
12730  ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12731  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12732  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12733  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3),
12734  v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
12735  v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
12736  v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
12737  v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
12738  v29_(v29), v30_(v30) {}
12739 
12740  template <typename T>
12741  operator ParamGenerator<T>() const
12742  {
12743  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12744  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12745  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12746  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12747  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12748  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12749  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12750  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12751  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12752  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12753  static_cast<T>(v30_)
12754  };
12755  return ValuesIn(array);
12756  }
12757 
12758 private:
12759  // No implementation - assignment is unsupported.
12760  void operator=(const ValueArray30 & other);
12761 
12762  const T1 v1_;
12763  const T2 v2_;
12764  const T3 v3_;
12765  const T4 v4_;
12766  const T5 v5_;
12767  const T6 v6_;
12768  const T7 v7_;
12769  const T8 v8_;
12770  const T9 v9_;
12771  const T10 v10_;
12772  const T11 v11_;
12773  const T12 v12_;
12774  const T13 v13_;
12775  const T14 v14_;
12776  const T15 v15_;
12777  const T16 v16_;
12778  const T17 v17_;
12779  const T18 v18_;
12780  const T19 v19_;
12781  const T20 v20_;
12782  const T21 v21_;
12783  const T22 v22_;
12784  const T23 v23_;
12785  const T24 v24_;
12786  const T25 v25_;
12787  const T26 v26_;
12788  const T27 v27_;
12789  const T28 v28_;
12790  const T29 v29_;
12791  const T30 v30_;
12792 };
12793 
12794 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12795  typename T6, typename T7, typename T8, typename T9, typename T10,
12796  typename T11, typename T12, typename T13, typename T14, typename T15,
12797  typename T16, typename T17, typename T18, typename T19, typename T20,
12798  typename T21, typename T22, typename T23, typename T24, typename T25,
12799  typename T26, typename T27, typename T28, typename T29, typename T30,
12800  typename T31>
12801 class ValueArray31
12802 {
12803 public:
12804  ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12805  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12806  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12807  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2),
12808  v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
12809  v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
12810  v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
12811  v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
12812  v29_(v29), v30_(v30), v31_(v31) {}
12813 
12814  template <typename T>
12815  operator ParamGenerator<T>() const
12816  {
12817  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12818  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12819  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12820  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12821  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12822  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12823  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12824  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12825  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12826  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12827  static_cast<T>(v30_), static_cast<T>(v31_)
12828  };
12829  return ValuesIn(array);
12830  }
12831 
12832 private:
12833  // No implementation - assignment is unsupported.
12834  void operator=(const ValueArray31 & other);
12835 
12836  const T1 v1_;
12837  const T2 v2_;
12838  const T3 v3_;
12839  const T4 v4_;
12840  const T5 v5_;
12841  const T6 v6_;
12842  const T7 v7_;
12843  const T8 v8_;
12844  const T9 v9_;
12845  const T10 v10_;
12846  const T11 v11_;
12847  const T12 v12_;
12848  const T13 v13_;
12849  const T14 v14_;
12850  const T15 v15_;
12851  const T16 v16_;
12852  const T17 v17_;
12853  const T18 v18_;
12854  const T19 v19_;
12855  const T20 v20_;
12856  const T21 v21_;
12857  const T22 v22_;
12858  const T23 v23_;
12859  const T24 v24_;
12860  const T25 v25_;
12861  const T26 v26_;
12862  const T27 v27_;
12863  const T28 v28_;
12864  const T29 v29_;
12865  const T30 v30_;
12866  const T31 v31_;
12867 };
12868 
12869 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12870  typename T6, typename T7, typename T8, typename T9, typename T10,
12871  typename T11, typename T12, typename T13, typename T14, typename T15,
12872  typename T16, typename T17, typename T18, typename T19, typename T20,
12873  typename T21, typename T22, typename T23, typename T24, typename T25,
12874  typename T26, typename T27, typename T28, typename T29, typename T30,
12875  typename T31, typename T32>
12876 class ValueArray32
12877 {
12878 public:
12879  ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12880  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12881  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12882  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1),
12883  v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
12884  v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
12885  v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
12886  v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
12887  v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {}
12888 
12889  template <typename T>
12890  operator ParamGenerator<T>() const
12891  {
12892  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12893  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12894  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12895  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12896  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12897  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12898  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12899  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12900  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12901  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12902  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_)
12903  };
12904  return ValuesIn(array);
12905  }
12906 
12907 private:
12908  // No implementation - assignment is unsupported.
12909  void operator=(const ValueArray32 & other);
12910 
12911  const T1 v1_;
12912  const T2 v2_;
12913  const T3 v3_;
12914  const T4 v4_;
12915  const T5 v5_;
12916  const T6 v6_;
12917  const T7 v7_;
12918  const T8 v8_;
12919  const T9 v9_;
12920  const T10 v10_;
12921  const T11 v11_;
12922  const T12 v12_;
12923  const T13 v13_;
12924  const T14 v14_;
12925  const T15 v15_;
12926  const T16 v16_;
12927  const T17 v17_;
12928  const T18 v18_;
12929  const T19 v19_;
12930  const T20 v20_;
12931  const T21 v21_;
12932  const T22 v22_;
12933  const T23 v23_;
12934  const T24 v24_;
12935  const T25 v25_;
12936  const T26 v26_;
12937  const T27 v27_;
12938  const T28 v28_;
12939  const T29 v29_;
12940  const T30 v30_;
12941  const T31 v31_;
12942  const T32 v32_;
12943 };
12944 
12945 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12946  typename T6, typename T7, typename T8, typename T9, typename T10,
12947  typename T11, typename T12, typename T13, typename T14, typename T15,
12948  typename T16, typename T17, typename T18, typename T19, typename T20,
12949  typename T21, typename T22, typename T23, typename T24, typename T25,
12950  typename T26, typename T27, typename T28, typename T29, typename T30,
12951  typename T31, typename T32, typename T33>
12952 class ValueArray33
12953 {
12954 public:
12955  ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12956  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12957  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12958  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
12959  T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
12960  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
12961  v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
12962  v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
12963  v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
12964  v33_(v33) {}
12965 
12966  template <typename T>
12967  operator ParamGenerator<T>() const
12968  {
12969  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12970  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12971  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12972  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12973  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12974  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12975  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12976  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12977  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12978  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12979  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12980  static_cast<T>(v33_)
12981  };
12982  return ValuesIn(array);
12983  }
12984 
12985 private:
12986  // No implementation - assignment is unsupported.
12987  void operator=(const ValueArray33 & other);
12988 
12989  const T1 v1_;
12990  const T2 v2_;
12991  const T3 v3_;
12992  const T4 v4_;
12993  const T5 v5_;
12994  const T6 v6_;
12995  const T7 v7_;
12996  const T8 v8_;
12997  const T9 v9_;
12998  const T10 v10_;
12999  const T11 v11_;
13000  const T12 v12_;
13001  const T13 v13_;
13002  const T14 v14_;
13003  const T15 v15_;
13004  const T16 v16_;
13005  const T17 v17_;
13006  const T18 v18_;
13007  const T19 v19_;
13008  const T20 v20_;
13009  const T21 v21_;
13010  const T22 v22_;
13011  const T23 v23_;
13012  const T24 v24_;
13013  const T25 v25_;
13014  const T26 v26_;
13015  const T27 v27_;
13016  const T28 v28_;
13017  const T29 v29_;
13018  const T30 v30_;
13019  const T31 v31_;
13020  const T32 v32_;
13021  const T33 v33_;
13022 };
13023 
13024 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13025  typename T6, typename T7, typename T8, typename T9, typename T10,
13026  typename T11, typename T12, typename T13, typename T14, typename T15,
13027  typename T16, typename T17, typename T18, typename T19, typename T20,
13028  typename T21, typename T22, typename T23, typename T24, typename T25,
13029  typename T26, typename T27, typename T28, typename T29, typename T30,
13030  typename T31, typename T32, typename T33, typename T34>
13031 class ValueArray34
13032 {
13033 public:
13034  ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13035  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13036  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13037  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13038  T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
13039  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
13040  v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
13041  v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
13042  v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
13043  v33_(v33), v34_(v34) {}
13044 
13045  template <typename T>
13046  operator ParamGenerator<T>() const
13047  {
13048  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13049  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13050  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13051  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13052  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13053  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13054  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13055  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13056  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13057  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13058  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13059  static_cast<T>(v33_), static_cast<T>(v34_)
13060  };
13061  return ValuesIn(array);
13062  }
13063 
13064 private:
13065  // No implementation - assignment is unsupported.
13066  void operator=(const ValueArray34 & other);
13067 
13068  const T1 v1_;
13069  const T2 v2_;
13070  const T3 v3_;
13071  const T4 v4_;
13072  const T5 v5_;
13073  const T6 v6_;
13074  const T7 v7_;
13075  const T8 v8_;
13076  const T9 v9_;
13077  const T10 v10_;
13078  const T11 v11_;
13079  const T12 v12_;
13080  const T13 v13_;
13081  const T14 v14_;
13082  const T15 v15_;
13083  const T16 v16_;
13084  const T17 v17_;
13085  const T18 v18_;
13086  const T19 v19_;
13087  const T20 v20_;
13088  const T21 v21_;
13089  const T22 v22_;
13090  const T23 v23_;
13091  const T24 v24_;
13092  const T25 v25_;
13093  const T26 v26_;
13094  const T27 v27_;
13095  const T28 v28_;
13096  const T29 v29_;
13097  const T30 v30_;
13098  const T31 v31_;
13099  const T32 v32_;
13100  const T33 v33_;
13101  const T34 v34_;
13102 };
13103 
13104 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13105  typename T6, typename T7, typename T8, typename T9, typename T10,
13106  typename T11, typename T12, typename T13, typename T14, typename T15,
13107  typename T16, typename T17, typename T18, typename T19, typename T20,
13108  typename T21, typename T22, typename T23, typename T24, typename T25,
13109  typename T26, typename T27, typename T28, typename T29, typename T30,
13110  typename T31, typename T32, typename T33, typename T34, typename T35>
13111 class ValueArray35
13112 {
13113 public:
13114  ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13115  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13116  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13117  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13118  T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
13119  v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
13120  v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
13121  v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
13122  v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
13123  v32_(v32), v33_(v33), v34_(v34), v35_(v35) {}
13124 
13125  template <typename T>
13126  operator ParamGenerator<T>() const
13127  {
13128  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13129  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13130  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13131  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13132  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13133  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13134  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13135  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13136  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13137  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13138  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13139  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_)
13140  };
13141  return ValuesIn(array);
13142  }
13143 
13144 private:
13145  // No implementation - assignment is unsupported.
13146  void operator=(const ValueArray35 & other);
13147 
13148  const T1 v1_;
13149  const T2 v2_;
13150  const T3 v3_;
13151  const T4 v4_;
13152  const T5 v5_;
13153  const T6 v6_;
13154  const T7 v7_;
13155  const T8 v8_;
13156  const T9 v9_;
13157  const T10 v10_;
13158  const T11 v11_;
13159  const T12 v12_;
13160  const T13 v13_;
13161  const T14 v14_;
13162  const T15 v15_;
13163  const T16 v16_;
13164  const T17 v17_;
13165  const T18 v18_;
13166  const T19 v19_;
13167  const T20 v20_;
13168  const T21 v21_;
13169  const T22 v22_;
13170  const T23 v23_;
13171  const T24 v24_;
13172  const T25 v25_;
13173  const T26 v26_;
13174  const T27 v27_;
13175  const T28 v28_;
13176  const T29 v29_;
13177  const T30 v30_;
13178  const T31 v31_;
13179  const T32 v32_;
13180  const T33 v33_;
13181  const T34 v34_;
13182  const T35 v35_;
13183 };
13184 
13185 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13186  typename T6, typename T7, typename T8, typename T9, typename T10,
13187  typename T11, typename T12, typename T13, typename T14, typename T15,
13188  typename T16, typename T17, typename T18, typename T19, typename T20,
13189  typename T21, typename T22, typename T23, typename T24, typename T25,
13190  typename T26, typename T27, typename T28, typename T29, typename T30,
13191  typename T31, typename T32, typename T33, typename T34, typename T35,
13192  typename T36>
13193 class ValueArray36
13194 {
13195 public:
13196  ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13197  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13198  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13199  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13200  T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
13201  v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
13202  v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
13203  v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
13204  v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
13205  v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {}
13206 
13207  template <typename T>
13208  operator ParamGenerator<T>() const
13209  {
13210  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13211  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13212  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13213  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13214  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13215  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13216  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13217  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13218  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13219  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13220  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13221  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13222  static_cast<T>(v36_)
13223  };
13224  return ValuesIn(array);
13225  }
13226 
13227 private:
13228  // No implementation - assignment is unsupported.
13229  void operator=(const ValueArray36 & other);
13230 
13231  const T1 v1_;
13232  const T2 v2_;
13233  const T3 v3_;
13234  const T4 v4_;
13235  const T5 v5_;
13236  const T6 v6_;
13237  const T7 v7_;
13238  const T8 v8_;
13239  const T9 v9_;
13240  const T10 v10_;
13241  const T11 v11_;
13242  const T12 v12_;
13243  const T13 v13_;
13244  const T14 v14_;
13245  const T15 v15_;
13246  const T16 v16_;
13247  const T17 v17_;
13248  const T18 v18_;
13249  const T19 v19_;
13250  const T20 v20_;
13251  const T21 v21_;
13252  const T22 v22_;
13253  const T23 v23_;
13254  const T24 v24_;
13255  const T25 v25_;
13256  const T26 v26_;
13257  const T27 v27_;
13258  const T28 v28_;
13259  const T29 v29_;
13260  const T30 v30_;
13261  const T31 v31_;
13262  const T32 v32_;
13263  const T33 v33_;
13264  const T34 v34_;
13265  const T35 v35_;
13266  const T36 v36_;
13267 };
13268 
13269 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13270  typename T6, typename T7, typename T8, typename T9, typename T10,
13271  typename T11, typename T12, typename T13, typename T14, typename T15,
13272  typename T16, typename T17, typename T18, typename T19, typename T20,
13273  typename T21, typename T22, typename T23, typename T24, typename T25,
13274  typename T26, typename T27, typename T28, typename T29, typename T30,
13275  typename T31, typename T32, typename T33, typename T34, typename T35,
13276  typename T36, typename T37>
13277 class ValueArray37
13278 {
13279 public:
13280  ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13281  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13282  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13283  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13284  T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
13285  v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
13286  v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
13287  v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
13288  v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
13289  v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
13290  v36_(v36), v37_(v37) {}
13291 
13292  template <typename T>
13293  operator ParamGenerator<T>() const
13294  {
13295  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13296  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13297  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13298  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13299  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13300  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13301  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13302  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13303  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13304  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13305  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13306  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13307  static_cast<T>(v36_), static_cast<T>(v37_)
13308  };
13309  return ValuesIn(array);
13310  }
13311 
13312 private:
13313  // No implementation - assignment is unsupported.
13314  void operator=(const ValueArray37 & other);
13315 
13316  const T1 v1_;
13317  const T2 v2_;
13318  const T3 v3_;
13319  const T4 v4_;
13320  const T5 v5_;
13321  const T6 v6_;
13322  const T7 v7_;
13323  const T8 v8_;
13324  const T9 v9_;
13325  const T10 v10_;
13326  const T11 v11_;
13327  const T12 v12_;
13328  const T13 v13_;
13329  const T14 v14_;
13330  const T15 v15_;
13331  const T16 v16_;
13332  const T17 v17_;
13333  const T18 v18_;
13334  const T19 v19_;
13335  const T20 v20_;
13336  const T21 v21_;
13337  const T22 v22_;
13338  const T23 v23_;
13339  const T24 v24_;
13340  const T25 v25_;
13341  const T26 v26_;
13342  const T27 v27_;
13343  const T28 v28_;
13344  const T29 v29_;
13345  const T30 v30_;
13346  const T31 v31_;
13347  const T32 v32_;
13348  const T33 v33_;
13349  const T34 v34_;
13350  const T35 v35_;
13351  const T36 v36_;
13352  const T37 v37_;
13353 };
13354 
13355 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13356  typename T6, typename T7, typename T8, typename T9, typename T10,
13357  typename T11, typename T12, typename T13, typename T14, typename T15,
13358  typename T16, typename T17, typename T18, typename T19, typename T20,
13359  typename T21, typename T22, typename T23, typename T24, typename T25,
13360  typename T26, typename T27, typename T28, typename T29, typename T30,
13361  typename T31, typename T32, typename T33, typename T34, typename T35,
13362  typename T36, typename T37, typename T38>
13363 class ValueArray38
13364 {
13365 public:
13366  ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13367  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13368  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13369  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13370  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3),
13371  v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
13372  v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
13373  v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
13374  v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
13375  v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
13376  v35_(v35), v36_(v36), v37_(v37), v38_(v38) {}
13377 
13378  template <typename T>
13379  operator ParamGenerator<T>() const
13380  {
13381  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13382  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13383  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13384  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13385  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13386  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13387  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13388  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13389  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13390  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13391  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13392  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13393  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_)
13394  };
13395  return ValuesIn(array);
13396  }
13397 
13398 private:
13399  // No implementation - assignment is unsupported.
13400  void operator=(const ValueArray38 & other);
13401 
13402  const T1 v1_;
13403  const T2 v2_;
13404  const T3 v3_;
13405  const T4 v4_;
13406  const T5 v5_;
13407  const T6 v6_;
13408  const T7 v7_;
13409  const T8 v8_;
13410  const T9 v9_;
13411  const T10 v10_;
13412  const T11 v11_;
13413  const T12 v12_;
13414  const T13 v13_;
13415  const T14 v14_;
13416  const T15 v15_;
13417  const T16 v16_;
13418  const T17 v17_;
13419  const T18 v18_;
13420  const T19 v19_;
13421  const T20 v20_;
13422  const T21 v21_;
13423  const T22 v22_;
13424  const T23 v23_;
13425  const T24 v24_;
13426  const T25 v25_;
13427  const T26 v26_;
13428  const T27 v27_;
13429  const T28 v28_;
13430  const T29 v29_;
13431  const T30 v30_;
13432  const T31 v31_;
13433  const T32 v32_;
13434  const T33 v33_;
13435  const T34 v34_;
13436  const T35 v35_;
13437  const T36 v36_;
13438  const T37 v37_;
13439  const T38 v38_;
13440 };
13441 
13442 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13443  typename T6, typename T7, typename T8, typename T9, typename T10,
13444  typename T11, typename T12, typename T13, typename T14, typename T15,
13445  typename T16, typename T17, typename T18, typename T19, typename T20,
13446  typename T21, typename T22, typename T23, typename T24, typename T25,
13447  typename T26, typename T27, typename T28, typename T29, typename T30,
13448  typename T31, typename T32, typename T33, typename T34, typename T35,
13449  typename T36, typename T37, typename T38, typename T39>
13450 class ValueArray39
13451 {
13452 public:
13453  ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13454  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13455  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13456  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13457  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2),
13458  v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
13459  v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
13460  v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
13461  v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
13462  v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
13463  v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {}
13464 
13465  template <typename T>
13466  operator ParamGenerator<T>() const
13467  {
13468  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13469  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13470  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13471  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13472  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13473  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13474  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13475  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13476  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13477  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13478  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13479  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13480  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13481  static_cast<T>(v39_)
13482  };
13483  return ValuesIn(array);
13484  }
13485 
13486 private:
13487  // No implementation - assignment is unsupported.
13488  void operator=(const ValueArray39 & other);
13489 
13490  const T1 v1_;
13491  const T2 v2_;
13492  const T3 v3_;
13493  const T4 v4_;
13494  const T5 v5_;
13495  const T6 v6_;
13496  const T7 v7_;
13497  const T8 v8_;
13498  const T9 v9_;
13499  const T10 v10_;
13500  const T11 v11_;
13501  const T12 v12_;
13502  const T13 v13_;
13503  const T14 v14_;
13504  const T15 v15_;
13505  const T16 v16_;
13506  const T17 v17_;
13507  const T18 v18_;
13508  const T19 v19_;
13509  const T20 v20_;
13510  const T21 v21_;
13511  const T22 v22_;
13512  const T23 v23_;
13513  const T24 v24_;
13514  const T25 v25_;
13515  const T26 v26_;
13516  const T27 v27_;
13517  const T28 v28_;
13518  const T29 v29_;
13519  const T30 v30_;
13520  const T31 v31_;
13521  const T32 v32_;
13522  const T33 v33_;
13523  const T34 v34_;
13524  const T35 v35_;
13525  const T36 v36_;
13526  const T37 v37_;
13527  const T38 v38_;
13528  const T39 v39_;
13529 };
13530 
13531 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13532  typename T6, typename T7, typename T8, typename T9, typename T10,
13533  typename T11, typename T12, typename T13, typename T14, typename T15,
13534  typename T16, typename T17, typename T18, typename T19, typename T20,
13535  typename T21, typename T22, typename T23, typename T24, typename T25,
13536  typename T26, typename T27, typename T28, typename T29, typename T30,
13537  typename T31, typename T32, typename T33, typename T34, typename T35,
13538  typename T36, typename T37, typename T38, typename T39, typename T40>
13539 class ValueArray40
13540 {
13541 public:
13542  ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13543  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13544  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13545  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13546  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1),
13547  v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
13548  v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
13549  v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
13550  v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
13551  v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
13552  v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
13553  v40_(v40) {}
13554 
13555  template <typename T>
13556  operator ParamGenerator<T>() const
13557  {
13558  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13559  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13560  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13561  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13562  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13563  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13564  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13565  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13566  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13567  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13568  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13569  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13570  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13571  static_cast<T>(v39_), static_cast<T>(v40_)
13572  };
13573  return ValuesIn(array);
13574  }
13575 
13576 private:
13577  // No implementation - assignment is unsupported.
13578  void operator=(const ValueArray40 & other);
13579 
13580  const T1 v1_;
13581  const T2 v2_;
13582  const T3 v3_;
13583  const T4 v4_;
13584  const T5 v5_;
13585  const T6 v6_;
13586  const T7 v7_;
13587  const T8 v8_;
13588  const T9 v9_;
13589  const T10 v10_;
13590  const T11 v11_;
13591  const T12 v12_;
13592  const T13 v13_;
13593  const T14 v14_;
13594  const T15 v15_;
13595  const T16 v16_;
13596  const T17 v17_;
13597  const T18 v18_;
13598  const T19 v19_;
13599  const T20 v20_;
13600  const T21 v21_;
13601  const T22 v22_;
13602  const T23 v23_;
13603  const T24 v24_;
13604  const T25 v25_;
13605  const T26 v26_;
13606  const T27 v27_;
13607  const T28 v28_;
13608  const T29 v29_;
13609  const T30 v30_;
13610  const T31 v31_;
13611  const T32 v32_;
13612  const T33 v33_;
13613  const T34 v34_;
13614  const T35 v35_;
13615  const T36 v36_;
13616  const T37 v37_;
13617  const T38 v38_;
13618  const T39 v39_;
13619  const T40 v40_;
13620 };
13621 
13622 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13623  typename T6, typename T7, typename T8, typename T9, typename T10,
13624  typename T11, typename T12, typename T13, typename T14, typename T15,
13625  typename T16, typename T17, typename T18, typename T19, typename T20,
13626  typename T21, typename T22, typename T23, typename T24, typename T25,
13627  typename T26, typename T27, typename T28, typename T29, typename T30,
13628  typename T31, typename T32, typename T33, typename T34, typename T35,
13629  typename T36, typename T37, typename T38, typename T39, typename T40,
13630  typename T41>
13631 class ValueArray41
13632 {
13633 public:
13634  ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13635  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13636  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13637  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13638  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
13639  T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
13640  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
13641  v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
13642  v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
13643  v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
13644  v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
13645  v39_(v39), v40_(v40), v41_(v41) {}
13646 
13647  template <typename T>
13648  operator ParamGenerator<T>() const
13649  {
13650  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13651  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13652  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13653  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13654  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13655  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13656  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13657  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13658  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13659  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13660  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13661  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13662  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13663  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_)
13664  };
13665  return ValuesIn(array);
13666  }
13667 
13668 private:
13669  // No implementation - assignment is unsupported.
13670  void operator=(const ValueArray41 & other);
13671 
13672  const T1 v1_;
13673  const T2 v2_;
13674  const T3 v3_;
13675  const T4 v4_;
13676  const T5 v5_;
13677  const T6 v6_;
13678  const T7 v7_;
13679  const T8 v8_;
13680  const T9 v9_;
13681  const T10 v10_;
13682  const T11 v11_;
13683  const T12 v12_;
13684  const T13 v13_;
13685  const T14 v14_;
13686  const T15 v15_;
13687  const T16 v16_;
13688  const T17 v17_;
13689  const T18 v18_;
13690  const T19 v19_;
13691  const T20 v20_;
13692  const T21 v21_;
13693  const T22 v22_;
13694  const T23 v23_;
13695  const T24 v24_;
13696  const T25 v25_;
13697  const T26 v26_;
13698  const T27 v27_;
13699  const T28 v28_;
13700  const T29 v29_;
13701  const T30 v30_;
13702  const T31 v31_;
13703  const T32 v32_;
13704  const T33 v33_;
13705  const T34 v34_;
13706  const T35 v35_;
13707  const T36 v36_;
13708  const T37 v37_;
13709  const T38 v38_;
13710  const T39 v39_;
13711  const T40 v40_;
13712  const T41 v41_;
13713 };
13714 
13715 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13716  typename T6, typename T7, typename T8, typename T9, typename T10,
13717  typename T11, typename T12, typename T13, typename T14, typename T15,
13718  typename T16, typename T17, typename T18, typename T19, typename T20,
13719  typename T21, typename T22, typename T23, typename T24, typename T25,
13720  typename T26, typename T27, typename T28, typename T29, typename T30,
13721  typename T31, typename T32, typename T33, typename T34, typename T35,
13722  typename T36, typename T37, typename T38, typename T39, typename T40,
13723  typename T41, typename T42>
13724 class ValueArray42
13725 {
13726 public:
13727  ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13728  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13729  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13730  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13731  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13732  T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
13733  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
13734  v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
13735  v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
13736  v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
13737  v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
13738  v39_(v39), v40_(v40), v41_(v41), v42_(v42) {}
13739 
13740  template <typename T>
13741  operator ParamGenerator<T>() const
13742  {
13743  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13744  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13745  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13746  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13747  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13748  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13749  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13750  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13751  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13752  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13753  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13754  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13755  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13756  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13757  static_cast<T>(v42_)
13758  };
13759  return ValuesIn(array);
13760  }
13761 
13762 private:
13763  // No implementation - assignment is unsupported.
13764  void operator=(const ValueArray42 & other);
13765 
13766  const T1 v1_;
13767  const T2 v2_;
13768  const T3 v3_;
13769  const T4 v4_;
13770  const T5 v5_;
13771  const T6 v6_;
13772  const T7 v7_;
13773  const T8 v8_;
13774  const T9 v9_;
13775  const T10 v10_;
13776  const T11 v11_;
13777  const T12 v12_;
13778  const T13 v13_;
13779  const T14 v14_;
13780  const T15 v15_;
13781  const T16 v16_;
13782  const T17 v17_;
13783  const T18 v18_;
13784  const T19 v19_;
13785  const T20 v20_;
13786  const T21 v21_;
13787  const T22 v22_;
13788  const T23 v23_;
13789  const T24 v24_;
13790  const T25 v25_;
13791  const T26 v26_;
13792  const T27 v27_;
13793  const T28 v28_;
13794  const T29 v29_;
13795  const T30 v30_;
13796  const T31 v31_;
13797  const T32 v32_;
13798  const T33 v33_;
13799  const T34 v34_;
13800  const T35 v35_;
13801  const T36 v36_;
13802  const T37 v37_;
13803  const T38 v38_;
13804  const T39 v39_;
13805  const T40 v40_;
13806  const T41 v41_;
13807  const T42 v42_;
13808 };
13809 
13810 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13811  typename T6, typename T7, typename T8, typename T9, typename T10,
13812  typename T11, typename T12, typename T13, typename T14, typename T15,
13813  typename T16, typename T17, typename T18, typename T19, typename T20,
13814  typename T21, typename T22, typename T23, typename T24, typename T25,
13815  typename T26, typename T27, typename T28, typename T29, typename T30,
13816  typename T31, typename T32, typename T33, typename T34, typename T35,
13817  typename T36, typename T37, typename T38, typename T39, typename T40,
13818  typename T41, typename T42, typename T43>
13819 class ValueArray43
13820 {
13821 public:
13822  ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13823  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13824  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13825  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13826  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13827  T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
13828  v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
13829  v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
13830  v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
13831  v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
13832  v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37),
13833  v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {}
13834 
13835  template <typename T>
13836  operator ParamGenerator<T>() const
13837  {
13838  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13839  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13840  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13841  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13842  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13843  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13844  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13845  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13846  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13847  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13848  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13849  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13850  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13851  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13852  static_cast<T>(v42_), static_cast<T>(v43_)
13853  };
13854  return ValuesIn(array);
13855  }
13856 
13857 private:
13858  // No implementation - assignment is unsupported.
13859  void operator=(const ValueArray43 & other);
13860 
13861  const T1 v1_;
13862  const T2 v2_;
13863  const T3 v3_;
13864  const T4 v4_;
13865  const T5 v5_;
13866  const T6 v6_;
13867  const T7 v7_;
13868  const T8 v8_;
13869  const T9 v9_;
13870  const T10 v10_;
13871  const T11 v11_;
13872  const T12 v12_;
13873  const T13 v13_;
13874  const T14 v14_;
13875  const T15 v15_;
13876  const T16 v16_;
13877  const T17 v17_;
13878  const T18 v18_;
13879  const T19 v19_;
13880  const T20 v20_;
13881  const T21 v21_;
13882  const T22 v22_;
13883  const T23 v23_;
13884  const T24 v24_;
13885  const T25 v25_;
13886  const T26 v26_;
13887  const T27 v27_;
13888  const T28 v28_;
13889  const T29 v29_;
13890  const T30 v30_;
13891  const T31 v31_;
13892  const T32 v32_;
13893  const T33 v33_;
13894  const T34 v34_;
13895  const T35 v35_;
13896  const T36 v36_;
13897  const T37 v37_;
13898  const T38 v38_;
13899  const T39 v39_;
13900  const T40 v40_;
13901  const T41 v41_;
13902  const T42 v42_;
13903  const T43 v43_;
13904 };
13905 
13906 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13907  typename T6, typename T7, typename T8, typename T9, typename T10,
13908  typename T11, typename T12, typename T13, typename T14, typename T15,
13909  typename T16, typename T17, typename T18, typename T19, typename T20,
13910  typename T21, typename T22, typename T23, typename T24, typename T25,
13911  typename T26, typename T27, typename T28, typename T29, typename T30,
13912  typename T31, typename T32, typename T33, typename T34, typename T35,
13913  typename T36, typename T37, typename T38, typename T39, typename T40,
13914  typename T41, typename T42, typename T43, typename T44>
13915 class ValueArray44
13916 {
13917 public:
13918  ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13919  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13920  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13921  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13922  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13923  T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
13924  v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
13925  v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
13926  v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
13927  v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
13928  v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36),
13929  v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42),
13930  v43_(v43), v44_(v44) {}
13931 
13932  template <typename T>
13933  operator ParamGenerator<T>() const
13934  {
13935  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13936  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13937  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13938  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13939  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13940  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13941  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13942  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13943  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13944  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13945  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13946  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13947  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13948  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13949  static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_)
13950  };
13951  return ValuesIn(array);
13952  }
13953 
13954 private:
13955  // No implementation - assignment is unsupported.
13956  void operator=(const ValueArray44 & other);
13957 
13958  const T1 v1_;
13959  const T2 v2_;
13960  const T3 v3_;
13961  const T4 v4_;
13962  const T5 v5_;
13963  const T6 v6_;
13964  const T7 v7_;
13965  const T8 v8_;
13966  const T9 v9_;
13967  const T10 v10_;
13968  const T11 v11_;
13969  const T12 v12_;
13970  const T13 v13_;
13971  const T14 v14_;
13972  const T15 v15_;
13973  const T16 v16_;
13974  const T17 v17_;
13975  const T18 v18_;
13976  const T19 v19_;
13977  const T20 v20_;
13978  const T21 v21_;
13979  const T22 v22_;
13980  const T23 v23_;
13981  const T24 v24_;
13982  const T25 v25_;
13983  const T26 v26_;
13984  const T27 v27_;
13985  const T28 v28_;
13986  const T29 v29_;
13987  const T30 v30_;
13988  const T31 v31_;
13989  const T32 v32_;
13990  const T33 v33_;
13991  const T34 v34_;
13992  const T35 v35_;
13993  const T36 v36_;
13994  const T37 v37_;
13995  const T38 v38_;
13996  const T39 v39_;
13997  const T40 v40_;
13998  const T41 v41_;
13999  const T42 v42_;
14000  const T43 v43_;
14001  const T44 v44_;
14002 };
14003 
14004 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14005  typename T6, typename T7, typename T8, typename T9, typename T10,
14006  typename T11, typename T12, typename T13, typename T14, typename T15,
14007  typename T16, typename T17, typename T18, typename T19, typename T20,
14008  typename T21, typename T22, typename T23, typename T24, typename T25,
14009  typename T26, typename T27, typename T28, typename T29, typename T30,
14010  typename T31, typename T32, typename T33, typename T34, typename T35,
14011  typename T36, typename T37, typename T38, typename T39, typename T40,
14012  typename T41, typename T42, typename T43, typename T44, typename T45>
14013 class ValueArray45
14014 {
14015 public:
14016  ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
14017  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
14018  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
14019  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
14020  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
14021  T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
14022  v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
14023  v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
14024  v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
14025  v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
14026  v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
14027  v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41),
14028  v42_(v42), v43_(v43), v44_(v44), v45_(v45) {}
14029 
14030  template <typename T>
14031  operator ParamGenerator<T>() const
14032  {
14033  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
14034  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
14035  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
14036  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
14037  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
14038  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
14039  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
14040  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
14041  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
14042  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
14043  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
14044  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
14045  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
14046  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
14047  static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
14048  static_cast<T>(v45_)
14049  };
14050  return ValuesIn(array);
14051  }
14052 
14053 private:
14054  // No implementation - assignment is unsupported.
14055  void operator=(const ValueArray45 & other);
14056 
14057  const T1 v1_;
14058  const T2 v2_;
14059  const T3 v3_;
14060  const T4 v4_;
14061  const T5 v5_;
14062  const T6 v6_;
14063  const T7 v7_;
14064  const T8 v8_;
14065  const T9 v9_;
14066  const T10 v10_;
14067  const T11 v11_;
14068  const T12 v12_;
14069  const T13 v13_;
14070  const T14 v14_;
14071  const T15 v15_;
14072  const T16 v16_;
14073  const T17 v17_;
14074  const T18 v18_;
14075  const T19 v19_;
14076  const T20 v20_;
14077  const T21 v21_;
14078  const T22 v22_;
14079  const T23 v23_;
14080  const T24 v24_;
14081  const T25 v25_;
14082  const T26 v26_;
14083  const T27 v27_;
14084  const T28 v28_;
14085  const T29 v29_;
14086  const T30 v30_;
14087  const T31 v31_;
14088  const T32 v32_;
14089  const T33 v33_;
14090  const T34 v34_;
14091  const T35 v35_;
14092  const T36 v36_;
14093  const T37 v37_;
14094  const T38 v38_;
14095  const T39 v39_;
14096  const T40 v40_;
14097  const T41 v41_;
14098  const T42 v42_;
14099  const T43 v43_;
14100  const T44 v44_;
14101  const T45 v45_;
14102 };
14103 
14104 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14105  typename T6, typename T7, typename T8, typename T9, typename T10,
14106  typename T11, typename T12, typename T13, typename T14, typename T15,
14107  typename T16, typename T17, typename T18, typename T19, typename T20,
14108  typename T21, typename T22, typename T23, typename T24, typename T25,
14109  typename T26, typename T27, typename T28, typename T29, typename T30,
14110  typename T31, typename T32, typename T33, typename T34, typename T35,
14111  typename T36, typename T37, typename T38, typename T39, typename T40,
14112  typename T41, typename T42, typename T43, typename T44, typename T45,
14113  typename T46>
14114 class ValueArray46
14115 {
14116 public:
14117  ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
14118  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
14119  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
14120  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
14121  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
14122  T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3),
14123  v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
14124  v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
14125  v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
14126  v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
14127  v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
14128  v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
14129  v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {}
14130 
14131  template <typename T>
14132  operator ParamGenerator<T>() const
14133  {
14134  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
14135  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
14136  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
14137  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
14138  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
14139  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
14140  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
14141  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
14142  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
14143  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
14144  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
14145  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
14146  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
14147  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
14148  static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
14149  static_cast<T>(v45_), static_cast<T>(v46_)
14150  };
14151  return ValuesIn(array);
14152  }
14153 
14154 private:
14155  // No implementation - assignment is unsupported.
14156  void operator=(const ValueArray46 & other);
14157 
14158  const T1 v1_;
14159  const T2 v2_;
14160  const T3 v3_;
14161  const T4 v4_;
14162  const T5 v5_;
14163  const T6 v6_;
14164  const T7 v7_;
14165  const T8 v8_;
14166  const T9 v9_;
14167  const T10 v10_;
14168  const T11 v11_;
14169  const T12 v12_;
14170  const T13 v13_;
14171  const T14 v14_;
14172  const T15 v15_;
14173  const T16 v16_;
14174  const T17 v17_;
14175  const T18 v18_;
14176  const T19 v19_;
14177  const T20 v20_;
14178  const T21 v21_;
14179  const T22 v22_;
14180  const T23 v23_;
14181  const T24 v24_;
14182  const T25 v25_;
14183  const T26 v26_;
14184  const T27 v27_;
14185  const T28 v28_;
14186  const T29 v29_;
14187  const T30 v30_;
14188  const T31 v31_;
14189  const T32 v32_;
14190  const T33 v33_;
14191  const T34 v34_;
14192  const T35 v35_;
14193  const T36 v36_;
14194  const T37 v37_;
14195  const T38 v38_;
14196  const T39 v39_;
14197  const T40 v40_;
14198  const T41 v41_;
14199  const T42 v42_;
14200  const T43 v43_;
14201  const T44 v44_;
14202  const T45 v45_;
14203  const T46 v46_;
14204 };
14205 
14206 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14207  typename T6, typename T7, typename T8, typename T9, typename T10,
14208  typename T11, typename T12, typename T13, typename T14, typename T15,
14209  typename T16, typename T17, typename T18, typename T19, typename T20,
14210  typename T21, typename T22, typename T23, typename T24, typename T25,
14211  typename T26, typename T27, typename T28, typename T29, typename T30,
14212  typename T31, typename T32, typename T33, typename T34, typename T35,
14213  typename T36, typename T37, typename T38, typename T39, typename T40,
14214  typename T41, typename T42, typename T43, typename T44, typename T45,
14215  typename T46, typename T47>
14216 class ValueArray47
14217 {
14218 public:
14219  ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
14220  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
14221  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
14222  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
14223  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
14224  T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2),
14225  v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
14226  v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
14227  v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
14228  v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
14229  v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
14230  v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
14231  v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46),
14232  v47_(v47) {}
14233 
14234  template <typename T>
14235  operator ParamGenerator<T>() const
14236  {
14237  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
14238  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
14239  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
14240  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
14241  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
14242  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
14243  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
14244  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
14245  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
14246  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
14247  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
14248  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
14249  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
14250  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
14251  static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
14252  static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_)
14253  };
14254  return ValuesIn(array);
14255  }
14256 
14257 private:
14258  // No implementation - assignment is unsupported.
14259  void operator=(const ValueArray47 & other);
14260 
14261  const T1 v1_;
14262  const T2 v2_;
14263  const T3 v3_;
14264  const T4 v4_;
14265  const T5 v5_;
14266  const T6 v6_;
14267  const T7 v7_;
14268  const T8 v8_;
14269  const T9 v9_;
14270  const T10 v10_;
14271  const T11 v11_;
14272  const T12 v12_;
14273  const T13 v13_;
14274  const T14 v14_;
14275  const T15 v15_;
14276  const T16 v16_;
14277  const T17 v17_;
14278  const T18 v18_;
14279  const T19 v19_;
14280  const T20 v20_;
14281  const T21 v21_;
14282  const T22 v22_;
14283  const T23 v23_;
14284  const T24 v24_;
14285  const T25 v25_;
14286  const T26 v26_;
14287  const T27 v27_;
14288  const T28 v28_;
14289  const T29 v29_;
14290  const T30 v30_;
14291  const T31 v31_;
14292  const T32 v32_;
14293  const T33 v33_;
14294  const T34 v34_;
14295  const T35 v35_;
14296  const T36 v36_;
14297  const T37 v37_;
14298  const T38 v38_;
14299  const T39 v39_;
14300  const T40 v40_;
14301  const T41 v41_;
14302  const T42 v42_;
14303  const T43 v43_;
14304  const T44 v44_;
14305  const T45 v45_;
14306  const T46 v46_;
14307  const T47 v47_;
14308 };
14309 
14310 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14311  typename T6, typename T7, typename T8, typename T9, typename T10,
14312  typename T11, typename T12, typename T13, typename T14, typename T15,
14313  typename T16, typename T17, typename T18, typename T19, typename T20,
14314  typename T21, typename T22, typename T23, typename T24, typename T25,
14315  typename T26, typename T27, typename T28, typename T29, typename T30,
14316  typename T31, typename T32, typename T33, typename T34, typename T35,
14317  typename T36, typename T37, typename T38, typename T39, typename T40,
14318  typename T41, typename T42, typename T43, typename T44, typename T45,
14319  typename T46, typename T47, typename T48>
14320 class ValueArray48
14321 {
14322 public:
14323  ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
14324  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
14325  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
14326  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
14327  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
14328  T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1),
14329  v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
14330  v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
14331  v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
14332  v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
14333  v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
14334  v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
14335  v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45),
14336  v46_(v46), v47_(v47), v48_(v48) {}
14337 
14338  template <typename T>
14339  operator ParamGenerator<T>() const
14340  {
14341  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
14342  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
14343  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
14344  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
14345  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
14346  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
14347  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
14348  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
14349  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
14350  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
14351  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
14352  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
14353  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
14354  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
14355  static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
14356  static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_),
14357  static_cast<T>(v48_)
14358  };
14359  return ValuesIn(array);
14360  }
14361 
14362 private:
14363  // No implementation - assignment is unsupported.
14364  void operator=(const ValueArray48 & other);
14365 
14366  const T1 v1_;
14367  const T2 v2_;
14368  const T3 v3_;
14369  const T4 v4_;
14370  const T5 v5_;
14371  const T6 v6_;
14372  const T7 v7_;
14373  const T8 v8_;
14374  const T9 v9_;
14375  const T10 v10_;
14376  const T11 v11_;
14377  const T12 v12_;
14378  const T13 v13_;
14379  const T14 v14_;
14380  const T15 v15_;
14381  const T16 v16_;
14382  const T17 v17_;
14383  const T18 v18_;
14384  const T19 v19_;
14385  const T20 v20_;
14386  const T21 v21_;
14387  const T22 v22_;
14388  const T23 v23_;
14389  const T24 v24_;
14390  const T25 v25_;
14391  const T26 v26_;
14392  const T27 v27_;
14393  const T28 v28_;
14394  const T29 v29_;
14395  const T30 v30_;
14396  const T31 v31_;
14397  const T32 v32_;
14398  const T33 v33_;
14399  const T34 v34_;
14400  const T35 v35_;
14401  const T36 v36_;
14402  const T37 v37_;
14403  const T38 v38_;
14404  const T39 v39_;
14405  const T40 v40_;
14406  const T41 v41_;
14407  const T42 v42_;
14408  const T43 v43_;
14409  const T44 v44_;
14410  const T45 v45_;
14411  const T46 v46_;
14412  const T47 v47_;
14413  const T48 v48_;
14414 };
14415 
14416 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14417  typename T6, typename T7, typename T8, typename T9, typename T10,
14418  typename T11, typename T12, typename T13, typename T14, typename T15,
14419  typename T16, typename T17, typename T18, typename T19, typename T20,
14420  typename T21, typename T22, typename T23, typename T24, typename T25,
14421  typename T26, typename T27, typename T28, typename T29, typename T30,
14422  typename T31, typename T32, typename T33, typename T34, typename T35,
14423  typename T36, typename T37, typename T38, typename T39, typename T40,
14424  typename T41, typename T42, typename T43, typename T44, typename T45,
14425  typename T46, typename T47, typename T48, typename T49>
14426 class ValueArray49
14427 {
14428 public:
14429  ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
14430  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
14431  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
14432  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
14433  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
14434  T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48,
14435  T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
14436  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
14437  v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
14438  v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
14439  v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
14440  v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
14441  v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
14442  v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {}
14443 
14444  template <typename T>
14445  operator ParamGenerator<T>() const
14446  {
14447  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
14448  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
14449  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
14450  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
14451  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
14452  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
14453  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
14454  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
14455  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
14456  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
14457  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
14458  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
14459  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
14460  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
14461  static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
14462  static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_),
14463  static_cast<T>(v48_), static_cast<T>(v49_)
14464  };
14465  return ValuesIn(array);
14466  }
14467 
14468 private:
14469  // No implementation - assignment is unsupported.
14470  void operator=(const ValueArray49 & other);
14471 
14472  const T1 v1_;
14473  const T2 v2_;
14474  const T3 v3_;
14475  const T4 v4_;
14476  const T5 v5_;
14477  const T6 v6_;
14478  const T7 v7_;
14479  const T8 v8_;
14480  const T9 v9_;
14481  const T10 v10_;
14482  const T11 v11_;
14483  const T12 v12_;
14484  const T13 v13_;
14485  const T14 v14_;
14486  const T15 v15_;
14487  const T16 v16_;
14488  const T17 v17_;
14489  const T18 v18_;
14490  const T19 v19_;
14491  const T20 v20_;
14492  const T21 v21_;
14493  const T22 v22_;
14494  const T23 v23_;
14495  const T24 v24_;
14496  const T25 v25_;
14497  const T26 v26_;
14498  const T27 v27_;
14499  const T28 v28_;
14500  const T29 v29_;
14501  const T30 v30_;
14502  const T31 v31_;
14503  const T32 v32_;
14504  const T33 v33_;
14505  const T34 v34_;
14506  const T35 v35_;
14507  const T36 v36_;
14508  const T37 v37_;
14509  const T38 v38_;
14510  const T39 v39_;
14511  const T40 v40_;
14512  const T41 v41_;
14513  const T42 v42_;
14514  const T43 v43_;
14515  const T44 v44_;
14516  const T45 v45_;
14517  const T46 v46_;
14518  const T47 v47_;
14519  const T48 v48_;
14520  const T49 v49_;
14521 };
14522 
14523 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14524  typename T6, typename T7, typename T8, typename T9, typename T10,
14525  typename T11, typename T12, typename T13, typename T14, typename T15,
14526  typename T16, typename T17, typename T18, typename T19, typename T20,
14527  typename T21, typename T22, typename T23, typename T24, typename T25,
14528  typename T26, typename T27, typename T28, typename T29, typename T30,
14529  typename T31, typename T32, typename T33, typename T34, typename T35,
14530  typename T36, typename T37, typename T38, typename T39, typename T40,
14531  typename T41, typename T42, typename T43, typename T44, typename T45,
14532  typename T46, typename T47, typename T48, typename T49, typename T50>
14533 class ValueArray50
14534 {
14535 public:
14536  ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
14537  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
14538  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
14539  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
14540  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
14541  T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49,
14542  T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
14543  v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
14544  v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
14545  v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
14546  v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
14547  v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
14548  v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
14549  v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {}
14550 
14551  template <typename T>
14552  operator ParamGenerator<T>() const
14553  {
14554  const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
14555  static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
14556  static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
14557  static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
14558  static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
14559  static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
14560  static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
14561  static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
14562  static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
14563  static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
14564  static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
14565  static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
14566  static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
14567  static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
14568  static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
14569  static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_),
14570  static_cast<T>(v48_), static_cast<T>(v49_), static_cast<T>(v50_)
14571  };
14572  return ValuesIn(array);
14573  }
14574 
14575 private:
14576  // No implementation - assignment is unsupported.
14577  void operator=(const ValueArray50 & other);
14578 
14579  const T1 v1_;
14580  const T2 v2_;
14581  const T3 v3_;
14582  const T4 v4_;
14583  const T5 v5_;
14584  const T6 v6_;
14585  const T7 v7_;
14586  const T8 v8_;
14587  const T9 v9_;
14588  const T10 v10_;
14589  const T11 v11_;
14590  const T12 v12_;
14591  const T13 v13_;
14592  const T14 v14_;
14593  const T15 v15_;
14594  const T16 v16_;
14595  const T17 v17_;
14596  const T18 v18_;
14597  const T19 v19_;
14598  const T20 v20_;
14599  const T21 v21_;
14600  const T22 v22_;
14601  const T23 v23_;
14602  const T24 v24_;
14603  const T25 v25_;
14604  const T26 v26_;
14605  const T27 v27_;
14606  const T28 v28_;
14607  const T29 v29_;
14608  const T30 v30_;
14609  const T31 v31_;
14610  const T32 v32_;
14611  const T33 v33_;
14612  const T34 v34_;
14613  const T35 v35_;
14614  const T36 v36_;
14615  const T37 v37_;
14616  const T38 v38_;
14617  const T39 v39_;
14618  const T40 v40_;
14619  const T41 v41_;
14620  const T42 v42_;
14621  const T43 v43_;
14622  const T44 v44_;
14623  const T45 v45_;
14624  const T46 v46_;
14625  const T47 v47_;
14626  const T48 v48_;
14627  const T49 v49_;
14628  const T50 v50_;
14629 };
14630 
14631 # if GTEST_HAS_COMBINE
14632 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
14633 //
14634 // Generates values from the Cartesian product of values produced
14635 // by the argument generators.
14636 //
14637 template <typename T1, typename T2>
14639  : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> >
14640 {
14641 public:
14642  typedef ::std::tr1::tuple<T1, T2> ParamType;
14643 
14645  const ParamGenerator<T2> & g2)
14646  : g1_(g1), g2_(g2) {}
14648 
14650  {
14651  return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin());
14652  }
14654  {
14655  return new Iterator(this, g1_, g1_.end(), g2_, g2_.end());
14656  }
14657 
14658 private:
14659  class Iterator : public ParamIteratorInterface<ParamType>
14660  {
14661  public:
14663  const ParamGenerator<T1> & g1,
14664  const typename ParamGenerator<T1>::iterator & current1,
14665  const ParamGenerator<T2> & g2,
14666  const typename ParamGenerator<T2>::iterator & current2)
14667  : base_(base),
14668  begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
14669  begin2_(g2.begin()), end2_(g2.end()), current2_(current2)
14670  {
14671  ComputeCurrentValue();
14672  }
14673  virtual ~Iterator() {}
14674 
14676  {
14677  return base_;
14678  }
14679  // Advance should not be called on beyond-of-range iterators
14680  // so no component iterators must be beyond end of range, either.
14681  virtual void Advance()
14682  {
14683  assert(!AtEnd());
14684  ++current2_;
14685 
14686  if (current2_ == end2_)
14687  {
14688  current2_ = begin2_;
14689  ++current1_;
14690  }
14691 
14692  ComputeCurrentValue();
14693  }
14695  {
14696  return new Iterator(*this);
14697  }
14698  virtual const ParamType * Current() const { return &current_value_; }
14699  virtual bool Equals(const ParamIteratorInterface<ParamType> & other) const
14700  {
14701  // Having the same base generator guarantees that the other
14702  // iterator is of the same type and we can downcast.
14703  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
14704  << "The program attempted to compare iterators "
14705  << "from different generators." << std::endl;
14706  const Iterator * typed_other =
14707  CheckedDowncastToActualType<const Iterator>(&other);
14708  // We must report iterators equal if they both point beyond their
14709  // respective ranges. That can happen in a variety of fashions,
14710  // so we have to consult AtEnd().
14711  return (AtEnd() && typed_other->AtEnd()) ||
14712  (
14713  current1_ == typed_other->current1_ &&
14714  current2_ == typed_other->current2_);
14715  }
14716 
14717  private:
14718  Iterator(const Iterator & other)
14719  : base_(other.base_),
14720  begin1_(other.begin1_),
14721  end1_(other.end1_),
14722  current1_(other.current1_),
14723  begin2_(other.begin2_),
14724  end2_(other.end2_),
14725  current2_(other.current2_)
14726  {
14727  ComputeCurrentValue();
14728  }
14729 
14731  {
14732  if (!AtEnd())
14733  { current_value_ = ParamType(*current1_, *current2_); }
14734  }
14735  bool AtEnd() const
14736  {
14737  // We must report iterator past the end of the range when either of the
14738  // component iterators has reached the end of its range.
14739  return
14740  current1_ == end1_ ||
14741  current2_ == end2_;
14742  }
14743 
14744  // No implementation - assignment is unsupported.
14745  void operator=(const Iterator & other);
14746 
14747  const ParamGeneratorInterface<ParamType> * const base_;
14748  // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
14749  // current[i]_ is the actual traversing iterator.
14750  const typename ParamGenerator<T1>::iterator begin1_;
14751  const typename ParamGenerator<T1>::iterator end1_;
14752  typename ParamGenerator<T1>::iterator current1_;
14753  const typename ParamGenerator<T2>::iterator begin2_;
14754  const typename ParamGenerator<T2>::iterator end2_;
14755  typename ParamGenerator<T2>::iterator current2_;
14756  ParamType current_value_;
14757  }; // class CartesianProductGenerator2::Iterator
14758 
14759  // No implementation - assignment is unsupported.
14760  void operator=(const CartesianProductGenerator2 & other);
14761 
14762  const ParamGenerator<T1> g1_;
14763  const ParamGenerator<T2> g2_;
14764 }; // class CartesianProductGenerator2
14765 
14766 
14767 template <typename T1, typename T2, typename T3>
14769  : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> >
14770 {
14771 public:
14772  typedef ::std::tr1::tuple<T1, T2, T3> ParamType;
14773 
14775  const ParamGenerator<T2> & g2, const ParamGenerator<T3> & g3)
14776  : g1_(g1), g2_(g2), g3_(g3) {}
14778 
14780  {
14781  return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
14782  g3_.begin());
14783  }
14785  {
14786  return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end());
14787  }
14788 
14789 private:
14790  class Iterator : public ParamIteratorInterface<ParamType>
14791  {
14792  public:
14794  const ParamGenerator<T1> & g1,
14795  const typename ParamGenerator<T1>::iterator & current1,
14796  const ParamGenerator<T2> & g2,
14797  const typename ParamGenerator<T2>::iterator & current2,
14798  const ParamGenerator<T3> & g3,
14799  const typename ParamGenerator<T3>::iterator & current3)
14800  : base_(base),
14801  begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
14802  begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
14803  begin3_(g3.begin()), end3_(g3.end()), current3_(current3)
14804  {
14805  ComputeCurrentValue();
14806  }
14807  virtual ~Iterator() {}
14808 
14810  {
14811  return base_;
14812  }
14813  // Advance should not be called on beyond-of-range iterators
14814  // so no component iterators must be beyond end of range, either.
14815  virtual void Advance()
14816  {
14817  assert(!AtEnd());
14818  ++current3_;
14819 
14820  if (current3_ == end3_)
14821  {
14822  current3_ = begin3_;
14823  ++current2_;
14824  }
14825 
14826  if (current2_ == end2_)
14827  {
14828  current2_ = begin2_;
14829  ++current1_;
14830  }
14831 
14832  ComputeCurrentValue();
14833  }
14835  {
14836  return new Iterator(*this);
14837  }
14838  virtual const ParamType * Current() const { return &current_value_; }
14839  virtual bool Equals(const ParamIteratorInterface<ParamType> & other) const
14840  {
14841  // Having the same base generator guarantees that the other
14842  // iterator is of the same type and we can downcast.
14843  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
14844  << "The program attempted to compare iterators "
14845  << "from different generators." << std::endl;
14846  const Iterator * typed_other =
14847  CheckedDowncastToActualType<const Iterator>(&other);
14848  // We must report iterators equal if they both point beyond their
14849  // respective ranges. That can happen in a variety of fashions,
14850  // so we have to consult AtEnd().
14851  return (AtEnd() && typed_other->AtEnd()) ||
14852  (
14853  current1_ == typed_other->current1_ &&
14854  current2_ == typed_other->current2_ &&
14855  current3_ == typed_other->current3_);
14856  }
14857 
14858  private:
14859  Iterator(const Iterator & other)
14860  : base_(other.base_),
14861  begin1_(other.begin1_),
14862  end1_(other.end1_),
14863  current1_(other.current1_),
14864  begin2_(other.begin2_),
14865  end2_(other.end2_),
14866  current2_(other.current2_),
14867  begin3_(other.begin3_),
14868  end3_(other.end3_),
14869  current3_(other.current3_)
14870  {
14871  ComputeCurrentValue();
14872  }
14873 
14875  {
14876  if (!AtEnd())
14877  { current_value_ = ParamType(*current1_, *current2_, *current3_); }
14878  }
14879  bool AtEnd() const
14880  {
14881  // We must report iterator past the end of the range when either of the
14882  // component iterators has reached the end of its range.
14883  return
14884  current1_ == end1_ ||
14885  current2_ == end2_ ||
14886  current3_ == end3_;
14887  }
14888 
14889  // No implementation - assignment is unsupported.
14890  void operator=(const Iterator & other);
14891 
14892  const ParamGeneratorInterface<ParamType> * const base_;
14893  // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
14894  // current[i]_ is the actual traversing iterator.
14895  const typename ParamGenerator<T1>::iterator begin1_;
14896  const typename ParamGenerator<T1>::iterator end1_;
14897  typename ParamGenerator<T1>::iterator current1_;
14898  const typename ParamGenerator<T2>::iterator begin2_;
14899  const typename ParamGenerator<T2>::iterator end2_;
14900  typename ParamGenerator<T2>::iterator current2_;
14901  const typename ParamGenerator<T3>::iterator begin3_;
14902  const typename ParamGenerator<T3>::iterator end3_;
14903  typename ParamGenerator<T3>::iterator current3_;
14904  ParamType current_value_;
14905  }; // class CartesianProductGenerator3::Iterator
14906 
14907  // No implementation - assignment is unsupported.
14908  void operator=(const CartesianProductGenerator3 & other);
14909 
14910  const ParamGenerator<T1> g1_;
14911  const ParamGenerator<T2> g2_;
14912  const ParamGenerator<T3> g3_;
14913 }; // class CartesianProductGenerator3
14914 
14915 
14916 template <typename T1, typename T2, typename T3, typename T4>
14918  : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> >
14919 {
14920 public:
14921  typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType;
14922 
14924  const ParamGenerator<T2> & g2, const ParamGenerator<T3> & g3,
14925  const ParamGenerator<T4> & g4)
14926  : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
14928 
14930  {
14931  return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
14932  g3_.begin(), g4_, g4_.begin());
14933  }
14935  {
14936  return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
14937  g4_, g4_.end());
14938  }
14939 
14940 private:
14941  class Iterator : public ParamIteratorInterface<ParamType>
14942  {
14943  public:
14945  const ParamGenerator<T1> & g1,
14946  const typename ParamGenerator<T1>::iterator & current1,
14947  const ParamGenerator<T2> & g2,
14948  const typename ParamGenerator<T2>::iterator & current2,
14949  const ParamGenerator<T3> & g3,
14950  const typename ParamGenerator<T3>::iterator & current3,
14951  const ParamGenerator<T4> & g4,
14952  const typename ParamGenerator<T4>::iterator & current4)
14953  : base_(base),
14954  begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
14955  begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
14956  begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
14957  begin4_(g4.begin()), end4_(g4.end()), current4_(current4)
14958  {
14959  ComputeCurrentValue();
14960  }
14961  virtual ~Iterator() {}
14962 
14964  {
14965  return base_;
14966  }
14967  // Advance should not be called on beyond-of-range iterators
14968  // so no component iterators must be beyond end of range, either.
14969  virtual void Advance()
14970  {
14971  assert(!AtEnd());
14972  ++current4_;
14973 
14974  if (current4_ == end4_)
14975  {
14976  current4_ = begin4_;
14977  ++current3_;
14978  }
14979 
14980  if (current3_ == end3_)
14981  {
14982  current3_ = begin3_;
14983  ++current2_;
14984  }
14985 
14986  if (current2_ == end2_)
14987  {
14988  current2_ = begin2_;
14989  ++current1_;
14990  }
14991 
14992  ComputeCurrentValue();
14993  }
14995  {
14996  return new Iterator(*this);
14997  }
14998  virtual const ParamType * Current() const { return &current_value_; }
14999  virtual bool Equals(const ParamIteratorInterface<ParamType> & other) const
15000  {
15001  // Having the same base generator guarantees that the other
15002  // iterator is of the same type and we can downcast.
15003  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
15004  << "The program attempted to compare iterators "
15005  << "from different generators." << std::endl;
15006  const Iterator * typed_other =
15007  CheckedDowncastToActualType<const Iterator>(&other);
15008  // We must report iterators equal if they both point beyond their
15009  // respective ranges. That can happen in a variety of fashions,
15010  // so we have to consult AtEnd().
15011  return (AtEnd() && typed_other->AtEnd()) ||
15012  (
15013  current1_ == typed_other->current1_ &&
15014  current2_ == typed_other->current2_ &&
15015  current3_ == typed_other->current3_ &&
15016  current4_ == typed_other->current4_);
15017  }
15018 
15019  private:
15020  Iterator(const Iterator & other)
15021  : base_(other.base_),
15022  begin1_(other.begin1_),
15023  end1_(other.end1_),
15024  current1_(other.current1_),
15025  begin2_(other.begin2_),
15026  end2_(other.end2_),
15027  current2_(other.current2_),
15028  begin3_(other.begin3_),
15029  end3_(other.end3_),
15030  current3_(other.current3_),
15031  begin4_(other.begin4_),
15032  end4_(other.end4_),
15033  current4_(other.current4_)
15034  {
15035  ComputeCurrentValue();
15036  }
15037 
15039  {
15040  if (!AtEnd())
15041  current_value_ = ParamType(*current1_, *current2_, *current3_,
15042  *current4_);
15043  }
15044  bool AtEnd() const
15045  {
15046  // We must report iterator past the end of the range when either of the
15047  // component iterators has reached the end of its range.
15048  return
15049  current1_ == end1_ ||
15050  current2_ == end2_ ||
15051  current3_ == end3_ ||
15052  current4_ == end4_;
15053  }
15054 
15055  // No implementation - assignment is unsupported.
15056  void operator=(const Iterator & other);
15057 
15058  const ParamGeneratorInterface<ParamType> * const base_;
15059  // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
15060  // current[i]_ is the actual traversing iterator.
15061  const typename ParamGenerator<T1>::iterator begin1_;
15062  const typename ParamGenerator<T1>::iterator end1_;
15063  typename ParamGenerator<T1>::iterator current1_;
15064  const typename ParamGenerator<T2>::iterator begin2_;
15065  const typename ParamGenerator<T2>::iterator end2_;
15066  typename ParamGenerator<T2>::iterator current2_;
15067  const typename ParamGenerator<T3>::iterator begin3_;
15068  const typename ParamGenerator<T3>::iterator end3_;
15069  typename ParamGenerator<T3>::iterator current3_;
15070  const typename ParamGenerator<T4>::iterator begin4_;
15071  const typename ParamGenerator<T4>::iterator end4_;
15072  typename ParamGenerator<T4>::iterator current4_;
15073  ParamType current_value_;
15074  }; // class CartesianProductGenerator4::Iterator
15075 
15076  // No implementation - assignment is unsupported.
15077  void operator=(const CartesianProductGenerator4 & other);
15078 
15079  const ParamGenerator<T1> g1_;
15080  const ParamGenerator<T2> g2_;
15081  const ParamGenerator<T3> g3_;
15082  const ParamGenerator<T4> g4_;
15083 }; // class CartesianProductGenerator4
15084 
15085 
15086 template <typename T1, typename T2, typename T3, typename T4, typename T5>
15088  : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> >
15089 {
15090 public:
15091  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType;
15092 
15094  const ParamGenerator<T2> & g2, const ParamGenerator<T3> & g3,
15095  const ParamGenerator<T4> & g4, const ParamGenerator<T5> & g5)
15096  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
15098 
15100  {
15101  return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
15102  g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin());
15103  }
15105  {
15106  return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
15107  g4_, g4_.end(), g5_, g5_.end());
15108  }
15109 
15110 private:
15111  class Iterator : public ParamIteratorInterface<ParamType>
15112  {
15113  public:
15115  const ParamGenerator<T1> & g1,
15116  const typename ParamGenerator<T1>::iterator & current1,
15117  const ParamGenerator<T2> & g2,
15118  const typename ParamGenerator<T2>::iterator & current2,
15119  const ParamGenerator<T3> & g3,
15120  const typename ParamGenerator<T3>::iterator & current3,
15121  const ParamGenerator<T4> & g4,
15122  const typename ParamGenerator<T4>::iterator & current4,
15123  const ParamGenerator<T5> & g5,
15124  const typename ParamGenerator<T5>::iterator & current5)
15125  : base_(base),
15126  begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
15127  begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
15128  begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
15129  begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
15130  begin5_(g5.begin()), end5_(g5.end()), current5_(current5)
15131  {
15132  ComputeCurrentValue();
15133  }
15134  virtual ~Iterator() {}
15135 
15137  {
15138  return base_;
15139  }
15140  // Advance should not be called on beyond-of-range iterators
15141  // so no component iterators must be beyond end of range, either.
15142  virtual void Advance()
15143  {
15144  assert(!AtEnd());
15145  ++current5_;
15146 
15147  if (current5_ == end5_)
15148  {
15149  current5_ = begin5_;
15150  ++current4_;
15151  }
15152 
15153  if (current4_ == end4_)
15154  {
15155  current4_ = begin4_;
15156  ++current3_;
15157  }
15158 
15159  if (current3_ == end3_)
15160  {
15161  current3_ = begin3_;
15162  ++current2_;
15163  }
15164 
15165  if (current2_ == end2_)
15166  {
15167  current2_ = begin2_;
15168  ++current1_;
15169  }
15170 
15171  ComputeCurrentValue();
15172  }
15174  {
15175  return new Iterator(*this);
15176  }
15177  virtual const ParamType * Current() const { return &current_value_; }
15178  virtual bool Equals(const ParamIteratorInterface<ParamType> & other) const
15179  {
15180  // Having the same base generator guarantees that the other
15181  // iterator is of the same type and we can downcast.
15182  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
15183  << "The program attempted to compare iterators "
15184  << "from different generators." << std::endl;
15185  const Iterator * typed_other =
15186  CheckedDowncastToActualType<const Iterator>(&other);
15187  // We must report iterators equal if they both point beyond their
15188  // respective ranges. That can happen in a variety of fashions,
15189  // so we have to consult AtEnd().
15190  return (AtEnd() && typed_other->AtEnd()) ||
15191  (
15192  current1_ == typed_other->current1_ &&
15193  current2_ == typed_other->current2_ &&
15194  current3_ == typed_other->current3_ &&
15195  current4_ == typed_other->current4_ &&
15196  current5_ == typed_other->current5_);
15197  }
15198 
15199  private:
15200  Iterator(const Iterator & other)
15201  : base_(other.base_),
15202  begin1_(other.begin1_),
15203  end1_(other.end1_),
15204  current1_(other.current1_),
15205  begin2_(other.begin2_),
15206  end2_(other.end2_),
15207  current2_(other.current2_),
15208  begin3_(other.begin3_),
15209  end3_(other.end3_),
15210  current3_(other.current3_),
15211  begin4_(other.begin4_),
15212  end4_(other.end4_),
15213  current4_(other.current4_),
15214  begin5_(other.begin5_),
15215  end5_(other.end5_),
15216  current5_(other.current5_)
15217  {
15218  ComputeCurrentValue();
15219  }
15220 
15222  {
15223  if (!AtEnd())
15224  current_value_ = ParamType(*current1_, *current2_, *current3_,
15225  *current4_, *current5_);
15226  }
15227  bool AtEnd() const
15228  {
15229  // We must report iterator past the end of the range when either of the
15230  // component iterators has reached the end of its range.
15231  return
15232  current1_ == end1_ ||
15233  current2_ == end2_ ||
15234  current3_ == end3_ ||
15235  current4_ == end4_ ||
15236  current5_ == end5_;
15237  }
15238 
15239  // No implementation - assignment is unsupported.
15240  void operator=(const Iterator & other);
15241 
15242  const ParamGeneratorInterface<ParamType> * const base_;
15243  // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
15244  // current[i]_ is the actual traversing iterator.
15245  const typename ParamGenerator<T1>::iterator begin1_;
15246  const typename ParamGenerator<T1>::iterator end1_;
15247  typename ParamGenerator<T1>::iterator current1_;
15248  const typename ParamGenerator<T2>::iterator begin2_;
15249  const typename ParamGenerator<T2>::iterator end2_;
15250  typename ParamGenerator<T2>::iterator current2_;
15251  const typename ParamGenerator<T3>::iterator begin3_;
15252  const typename ParamGenerator<T3>::iterator end3_;
15253  typename ParamGenerator<T3>::iterator current3_;
15254  const typename ParamGenerator<T4>::iterator begin4_;
15255  const typename ParamGenerator<T4>::iterator end4_;
15256  typename ParamGenerator<T4>::iterator current4_;
15257  const typename ParamGenerator<T5>::iterator begin5_;
15258  const typename ParamGenerator<T5>::iterator end5_;
15259  typename ParamGenerator<T5>::iterator current5_;
15260  ParamType current_value_;
15261  }; // class CartesianProductGenerator5::Iterator
15262 
15263  // No implementation - assignment is unsupported.
15264  void operator=(const CartesianProductGenerator5 & other);
15265 
15266  const ParamGenerator<T1> g1_;
15267  const ParamGenerator<T2> g2_;
15268  const ParamGenerator<T3> g3_;
15269  const ParamGenerator<T4> g4_;
15270  const ParamGenerator<T5> g5_;
15271 }; // class CartesianProductGenerator5
15272 
15273 
15274 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15275  typename T6>
15277  : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5,
15278  T6> >
15279 {
15280 public:
15281  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType;
15282 
15284  const ParamGenerator<T2> & g2, const ParamGenerator<T3> & g3,
15285  const ParamGenerator<T4> & g4, const ParamGenerator<T5> & g5,
15286  const ParamGenerator<T6> & g6)
15287  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
15289 
15291  {
15292  return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
15293  g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin());
15294  }
15296  {
15297  return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
15298  g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end());
15299  }
15300 
15301 private:
15302  class Iterator : public ParamIteratorInterface<ParamType>
15303  {
15304  public:
15306  const ParamGenerator<T1> & g1,
15307  const typename ParamGenerator<T1>::iterator & current1,
15308  const ParamGenerator<T2> & g2,
15309  const typename ParamGenerator<T2>::iterator & current2,
15310  const ParamGenerator<T3> & g3,
15311  const typename ParamGenerator<T3>::iterator & current3,
15312  const ParamGenerator<T4> & g4,
15313  const typename ParamGenerator<T4>::iterator & current4,
15314  const ParamGenerator<T5> & g5,
15315  const typename ParamGenerator<T5>::iterator & current5,
15316  const ParamGenerator<T6> & g6,
15317  const typename ParamGenerator<T6>::iterator & current6)
15318  : base_(base),
15319  begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
15320  begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
15321  begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
15322  begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
15323  begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
15324  begin6_(g6.begin()), end6_(g6.end()), current6_(current6)
15325  {
15326  ComputeCurrentValue();
15327  }
15328  virtual ~Iterator() {}
15329 
15331  {
15332  return base_;
15333  }
15334  // Advance should not be called on beyond-of-range iterators
15335  // so no component iterators must be beyond end of range, either.
15336  virtual void Advance()
15337  {
15338  assert(!AtEnd());
15339  ++current6_;
15340 
15341  if (current6_ == end6_)
15342  {
15343  current6_ = begin6_;
15344  ++current5_;
15345  }
15346 
15347  if (current5_ == end5_)
15348  {
15349  current5_ = begin5_;
15350  ++current4_;
15351  }
15352 
15353  if (current4_ == end4_)
15354  {
15355  current4_ = begin4_;
15356  ++current3_;
15357  }
15358 
15359  if (current3_ == end3_)
15360  {
15361  current3_ = begin3_;
15362  ++current2_;
15363  }
15364 
15365  if (current2_ == end2_)
15366  {
15367  current2_ = begin2_;
15368  ++current1_;
15369  }
15370 
15371  ComputeCurrentValue();
15372  }
15374  {
15375  return new Iterator(*this);
15376  }
15377  virtual const ParamType * Current() const { return &current_value_; }
15378  virtual bool Equals(const ParamIteratorInterface<ParamType> & other) const
15379  {
15380  // Having the same base generator guarantees that the other
15381  // iterator is of the same type and we can downcast.
15382  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
15383  << "The program attempted to compare iterators "
15384  << "from different generators." << std::endl;
15385  const Iterator * typed_other =
15386  CheckedDowncastToActualType<const Iterator>(&other);
15387  // We must report iterators equal if they both point beyond their
15388  // respective ranges. That can happen in a variety of fashions,
15389  // so we have to consult AtEnd().
15390  return (AtEnd() && typed_other->AtEnd()) ||
15391  (
15392  current1_ == typed_other->current1_ &&
15393  current2_ == typed_other->current2_ &&
15394  current3_ == typed_other->current3_ &&
15395  current4_ == typed_other->current4_ &&
15396  current5_ == typed_other->current5_ &&
15397  current6_ == typed_other->current6_);
15398  }
15399 
15400  private:
15401  Iterator(const Iterator & other)
15402  : base_(other.base_),
15403  begin1_(other.begin1_),
15404  end1_(other.end1_),
15405  current1_(other.current1_),
15406  begin2_(other.begin2_),
15407  end2_(other.end2_),
15408  current2_(other.current2_),
15409  begin3_(other.begin3_),
15410  end3_(other.end3_),
15411  current3_(other.current3_),
15412  begin4_(other.begin4_),
15413  end4_(other.end4_),
15414  current4_(other.current4_),
15415  begin5_(other.begin5_),
15416  end5_(other.end5_),
15417  current5_(other.current5_),
15418  begin6_(other.begin6_),
15419  end6_(other.end6_),
15420  current6_(other.current6_)
15421  {
15422  ComputeCurrentValue();
15423  }
15424 
15426  {
15427  if (!AtEnd())
15428  current_value_ = ParamType(*current1_, *current2_, *current3_,
15429  *current4_, *current5_, *current6_);
15430  }
15431  bool AtEnd() const
15432  {
15433  // We must report iterator past the end of the range when either of the
15434  // component iterators has reached the end of its range.
15435  return
15436  current1_ == end1_ ||
15437  current2_ == end2_ ||
15438  current3_ == end3_ ||
15439  current4_ == end4_ ||
15440  current5_ == end5_ ||
15441  current6_ == end6_;
15442  }
15443 
15444  // No implementation - assignment is unsupported.
15445  void operator=(const Iterator & other);
15446 
15447  const ParamGeneratorInterface<ParamType> * const base_;
15448  // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
15449  // current[i]_ is the actual traversing iterator.
15450  const typename ParamGenerator<T1>::iterator begin1_;
15451  const typename ParamGenerator<T1>::iterator end1_;
15452  typename ParamGenerator<T1>::iterator current1_;
15453  const typename ParamGenerator<T2>::iterator begin2_;
15454  const typename ParamGenerator<T2>::iterator end2_;
15455  typename ParamGenerator<T2>::iterator current2_;
15456  const typename ParamGenerator<T3>::iterator begin3_;
15457  const typename ParamGenerator<T3>::iterator end3_;
15458  typename ParamGenerator<T3>::iterator current3_;
15459  const typename ParamGenerator<T4>::iterator begin4_;
15460  const typename ParamGenerator<T4>::iterator end4_;
15461  typename ParamGenerator<T4>::iterator current4_;
15462  const typename ParamGenerator<T5>::iterator begin5_;
15463  const typename ParamGenerator<T5>::iterator end5_;
15464  typename ParamGenerator<T5>::iterator current5_;
15465  const typename ParamGenerator<T6>::iterator begin6_;
15466  const typename ParamGenerator<T6>::iterator end6_;
15467  typename ParamGenerator<T6>::iterator current6_;
15468  ParamType current_value_;
15469  }; // class CartesianProductGenerator6::Iterator
15470 
15471  // No implementation - assignment is unsupported.
15472  void operator=(const CartesianProductGenerator6 & other);
15473 
15474  const ParamGenerator<T1> g1_;
15475  const ParamGenerator<T2> g2_;
15476  const ParamGenerator<T3> g3_;
15477  const ParamGenerator<T4> g4_;
15478  const ParamGenerator<T5> g5_;
15479  const ParamGenerator<T6> g6_;
15480 }; // class CartesianProductGenerator6
15481 
15482 
15483 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15484  typename T6, typename T7>
15486  : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
15487  T7> >
15488 {
15489 public:
15490  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType;
15491 
15493  const ParamGenerator<T2> & g2, const ParamGenerator<T3> & g3,
15494  const ParamGenerator<T4> & g4, const ParamGenerator<T5> & g5,
15495  const ParamGenerator<T6> & g6, const ParamGenerator<T7> & g7)
15496  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
15498 
15500  {
15501  return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
15502  g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
15503  g7_.begin());
15504  }
15506  {
15507  return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
15508  g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end());
15509  }
15510 
15511 private:
15512  class Iterator : public ParamIteratorInterface<ParamType>
15513  {
15514  public:
15516  const ParamGenerator<T1> & g1,
15517  const typename ParamGenerator<T1>::iterator & current1,
15518  const ParamGenerator<T2> & g2,
15519  const typename ParamGenerator<T2>::iterator & current2,
15520  const ParamGenerator<T3> & g3,
15521  const typename ParamGenerator<T3>::iterator & current3,
15522  const ParamGenerator<T4> & g4,
15523  const typename ParamGenerator<T4>::iterator & current4,
15524  const ParamGenerator<T5> & g5,
15525  const typename ParamGenerator<T5>::iterator & current5,
15526  const ParamGenerator<T6> & g6,
15527  const typename ParamGenerator<T6>::iterator & current6,
15528  const ParamGenerator<T7> & g7,
15529  const typename ParamGenerator<T7>::iterator & current7)
15530  : base_(base),
15531  begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
15532  begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
15533  begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
15534  begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
15535  begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
15536  begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
15537  begin7_(g7.begin()), end7_(g7.end()), current7_(current7)
15538  {
15539  ComputeCurrentValue();
15540  }
15541  virtual ~Iterator() {}
15542 
15544  {
15545  return base_;
15546  }
15547  // Advance should not be called on beyond-of-range iterators
15548  // so no component iterators must be beyond end of range, either.
15549  virtual void Advance()
15550  {
15551  assert(!AtEnd());
15552  ++current7_;
15553 
15554  if (current7_ == end7_)
15555  {
15556  current7_ = begin7_;
15557  ++current6_;
15558  }
15559 
15560  if (current6_ == end6_)
15561  {
15562  current6_ = begin6_;
15563  ++current5_;
15564  }
15565 
15566  if (current5_ == end5_)
15567  {
15568  current5_ = begin5_;
15569  ++current4_;
15570  }
15571 
15572  if (current4_ == end4_)
15573  {
15574  current4_ = begin4_;
15575  ++current3_;
15576  }
15577 
15578  if (current3_ == end3_)
15579  {
15580  current3_ = begin3_;
15581  ++current2_;
15582  }
15583 
15584  if (current2_ == end2_)
15585  {
15586  current2_ = begin2_;
15587  ++current1_;
15588  }
15589 
15590  ComputeCurrentValue();
15591  }
15593  {
15594  return new Iterator(*this);
15595  }
15596  virtual const ParamType * Current() const { return &current_value_; }
15597  virtual bool Equals(const ParamIteratorInterface<ParamType> & other) const
15598  {
15599  // Having the same base generator guarantees that the other
15600  // iterator is of the same type and we can downcast.
15601  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
15602  << "The program attempted to compare iterators "
15603  << "from different generators." << std::endl;
15604  const Iterator * typed_other =
15605  CheckedDowncastToActualType<const Iterator>(&other);
15606  // We must report iterators equal if they both point beyond their
15607  // respective ranges. That can happen in a variety of fashions,
15608  // so we have to consult AtEnd().
15609  return (AtEnd() && typed_other->AtEnd()) ||
15610  (
15611  current1_ == typed_other->current1_ &&
15612  current2_ == typed_other->current2_ &&
15613  current3_ == typed_other->current3_ &&
15614  current4_ == typed_other->current4_ &&
15615  current5_ == typed_other->current5_ &&
15616  current6_ == typed_other->current6_ &&
15617  current7_ == typed_other->current7_);
15618  }
15619 
15620  private:
15621  Iterator(const Iterator & other)
15622  : base_(other.base_),
15623  begin1_(other.begin1_),
15624  end1_(other.end1_),
15625  current1_(other.current1_),
15626  begin2_(other.begin2_),
15627  end2_(other.end2_),
15628  current2_(other.current2_),
15629  begin3_(other.begin3_),
15630  end3_(other.end3_),
15631  current3_(other.current3_),
15632  begin4_(other.begin4_),
15633  end4_(other.end4_),
15634  current4_(other.current4_),
15635  begin5_(other.begin5_),
15636  end5_(other.end5_),
15637  current5_(other.current5_),
15638  begin6_(other.begin6_),
15639  end6_(other.end6_),
15640  current6_(other.current6_),
15641  begin7_(other.begin7_),
15642  end7_(other.end7_),
15643  current7_(other.current7_)
15644  {
15645  ComputeCurrentValue();
15646  }
15647 
15649  {
15650  if (!AtEnd())
15651  current_value_ = ParamType(*current1_, *current2_, *current3_,
15652  *current4_, *current5_, *current6_, *current7_);
15653  }
15654  bool AtEnd() const
15655  {
15656  // We must report iterator past the end of the range when either of the
15657  // component iterators has reached the end of its range.
15658  return
15659  current1_ == end1_ ||
15660  current2_ == end2_ ||
15661  current3_ == end3_ ||
15662  current4_ == end4_ ||
15663  current5_ == end5_ ||
15664  current6_ == end6_ ||
15665  current7_ == end7_;
15666  }
15667 
15668  // No implementation - assignment is unsupported.
15669  void operator=(const Iterator & other);
15670 
15671  const ParamGeneratorInterface<ParamType> * const base_;
15672  // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
15673  // current[i]_ is the actual traversing iterator.
15674  const typename ParamGenerator<T1>::iterator begin1_;
15675  const typename ParamGenerator<T1>::iterator end1_;
15676  typename ParamGenerator<T1>::iterator current1_;
15677  const typename ParamGenerator<T2>::iterator begin2_;
15678  const typename ParamGenerator<T2>::iterator end2_;
15679  typename ParamGenerator<T2>::iterator current2_;
15680  const typename ParamGenerator<T3>::iterator begin3_;
15681  const typename ParamGenerator<T3>::iterator end3_;
15682  typename ParamGenerator<T3>::iterator current3_;
15683  const typename ParamGenerator<T4>::iterator begin4_;
15684  const typename ParamGenerator<T4>::iterator end4_;
15685  typename ParamGenerator<T4>::iterator current4_;
15686  const typename ParamGenerator<T5>::iterator begin5_;
15687  const typename ParamGenerator<T5>::iterator end5_;
15688  typename ParamGenerator<T5>::iterator current5_;
15689  const typename ParamGenerator<T6>::iterator begin6_;
15690  const typename ParamGenerator<T6>::iterator end6_;
15691  typename ParamGenerator<T6>::iterator current6_;
15692  const typename ParamGenerator<T7>::iterator begin7_;
15693  const typename ParamGenerator<T7>::iterator end7_;
15694  typename ParamGenerator<T7>::iterator current7_;
15695  ParamType current_value_;
15696  }; // class CartesianProductGenerator7::Iterator
15697 
15698  // No implementation - assignment is unsupported.
15699  void operator=(const CartesianProductGenerator7 & other);
15700 
15701  const ParamGenerator<T1> g1_;
15702  const ParamGenerator<T2> g2_;
15703  const ParamGenerator<T3> g3_;
15704  const ParamGenerator<T4> g4_;
15705  const ParamGenerator<T5> g5_;
15706  const ParamGenerator<T6> g6_;
15707  const ParamGenerator<T7> g7_;
15708 }; // class CartesianProductGenerator7
15709 
15710 
15711 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15712  typename T6, typename T7, typename T8>
15714  : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
15715  T7, T8> >
15716 {
15717 public:
15718  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType;
15719 
15721  const ParamGenerator<T2> & g2, const ParamGenerator<T3> & g3,
15722  const ParamGenerator<T4> & g4, const ParamGenerator<T5> & g5,
15723  const ParamGenerator<T6> & g6, const ParamGenerator<T7> & g7,
15724  const ParamGenerator<T8> & g8)
15725  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
15726  g8_(g8) {}
15728 
15730  {
15731  return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
15732  g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
15733  g7_.begin(), g8_, g8_.begin());
15734  }
15736  {
15737  return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
15738  g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
15739  g8_.end());
15740  }
15741 
15742 private:
15743  class Iterator : public ParamIteratorInterface<ParamType>
15744  {
15745  public:
15747  const ParamGenerator<T1> & g1,
15748  const typename ParamGenerator<T1>::iterator & current1,
15749  const ParamGenerator<T2> & g2,
15750  const typename ParamGenerator<T2>::iterator & current2,
15751  const ParamGenerator<T3> & g3,
15752  const typename ParamGenerator<T3>::iterator & current3,
15753  const ParamGenerator<T4> & g4,
15754  const typename ParamGenerator<T4>::iterator & current4,
15755  const ParamGenerator<T5> & g5,
15756  const typename ParamGenerator<T5>::iterator & current5,
15757  const ParamGenerator<T6> & g6,
15758  const typename ParamGenerator<T6>::iterator & current6,
15759  const ParamGenerator<T7> & g7,
15760  const typename ParamGenerator<T7>::iterator & current7,
15761  const ParamGenerator<T8> & g8,
15762  const typename ParamGenerator<T8>::iterator & current8)
15763  : base_(base),
15764  begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
15765  begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
15766  begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
15767  begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
15768  begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
15769  begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
15770  begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
15771  begin8_(g8.begin()), end8_(g8.end()), current8_(current8)
15772  {
15773  ComputeCurrentValue();
15774  }
15775  virtual ~Iterator() {}
15776 
15778  {
15779  return base_;
15780  }
15781  // Advance should not be called on beyond-of-range iterators
15782  // so no component iterators must be beyond end of range, either.
15783  virtual void Advance()
15784  {
15785  assert(!AtEnd());
15786  ++current8_;
15787 
15788  if (current8_ == end8_)
15789  {
15790  current8_ = begin8_;
15791  ++current7_;
15792  }
15793 
15794  if (current7_ == end7_)
15795  {
15796  current7_ = begin7_;
15797  ++current6_;
15798  }
15799 
15800  if (current6_ == end6_)
15801  {
15802  current6_ = begin6_;
15803  ++current5_;
15804  }
15805 
15806  if (current5_ == end5_)
15807  {
15808  current5_ = begin5_;
15809  ++current4_;
15810  }
15811 
15812  if (current4_ == end4_)
15813  {
15814  current4_ = begin4_;
15815  ++current3_;
15816  }
15817 
15818  if (current3_ == end3_)
15819  {
15820  current3_ = begin3_;
15821  ++current2_;
15822  }
15823 
15824  if (current2_ == end2_)
15825  {
15826  current2_ = begin2_;
15827  ++current1_;
15828  }
15829 
15830  ComputeCurrentValue();
15831  }
15833  {
15834  return new Iterator(*this);
15835  }
15836  virtual const ParamType * Current() const { return &current_value_; }
15837  virtual bool Equals(const ParamIteratorInterface<ParamType> & other) const
15838  {
15839  // Having the same base generator guarantees that the other
15840  // iterator is of the same type and we can downcast.
15841  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
15842  << "The program attempted to compare iterators "
15843  << "from different generators." << std::endl;
15844  const Iterator * typed_other =
15845  CheckedDowncastToActualType<const Iterator>(&other);
15846  // We must report iterators equal if they both point beyond their
15847  // respective ranges. That can happen in a variety of fashions,
15848  // so we have to consult AtEnd().
15849  return (AtEnd() && typed_other->AtEnd()) ||
15850  (
15851  current1_ == typed_other->current1_ &&
15852  current2_ == typed_other->current2_ &&
15853  current3_ == typed_other->current3_ &&
15854  current4_ == typed_other->current4_ &&
15855  current5_ == typed_other->current5_ &&
15856  current6_ == typed_other->current6_ &&
15857  current7_ == typed_other->current7_ &&
15858  current8_ == typed_other->current8_);
15859  }
15860 
15861  private:
15862  Iterator(const Iterator & other)
15863  : base_(other.base_),
15864  begin1_(other.begin1_),
15865  end1_(other.end1_),
15866  current1_(other.current1_),
15867  begin2_(other.begin2_),
15868  end2_(other.end2_),
15869  current2_(other.current2_),
15870  begin3_(other.begin3_),
15871  end3_(other.end3_),
15872  current3_(other.current3_),
15873  begin4_(other.begin4_),
15874  end4_(other.end4_),
15875  current4_(other.current4_),
15876  begin5_(other.begin5_),
15877  end5_(other.end5_),
15878  current5_(other.current5_),
15879  begin6_(other.begin6_),
15880  end6_(other.end6_),
15881  current6_(other.current6_),
15882  begin7_(other.begin7_),
15883  end7_(other.end7_),
15884  current7_(other.current7_),
15885  begin8_(other.begin8_),
15886  end8_(other.end8_),
15887  current8_(other.current8_)
15888  {
15889  ComputeCurrentValue();
15890  }
15891 
15893  {
15894  if (!AtEnd())
15895  current_value_ = ParamType(*current1_, *current2_, *current3_,
15896  *current4_, *current5_, *current6_, *current7_, *current8_);
15897  }
15898  bool AtEnd() const
15899  {
15900  // We must report iterator past the end of the range when either of the
15901  // component iterators has reached the end of its range.
15902  return
15903  current1_ == end1_ ||
15904  current2_ == end2_ ||
15905  current3_ == end3_ ||
15906  current4_ == end4_ ||
15907  current5_ == end5_ ||
15908  current6_ == end6_ ||
15909  current7_ == end7_ ||
15910  current8_ == end8_;
15911  }
15912 
15913  // No implementation - assignment is unsupported.
15914  void operator=(const Iterator & other);
15915 
15916  const ParamGeneratorInterface<ParamType> * const base_;
15917  // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
15918  // current[i]_ is the actual traversing iterator.
15919  const typename ParamGenerator<T1>::iterator begin1_;
15920  const typename ParamGenerator<T1>::iterator end1_;
15921  typename ParamGenerator<T1>::iterator current1_;
15922  const typename ParamGenerator<T2>::iterator begin2_;
15923  const typename ParamGenerator<T2>::iterator end2_;
15924  typename ParamGenerator<T2>::iterator current2_;
15925  const typename ParamGenerator<T3>::iterator begin3_;
15926  const typename ParamGenerator<T3>::iterator end3_;
15927  typename ParamGenerator<T3>::iterator current3_;
15928  const typename ParamGenerator<T4>::iterator begin4_;
15929  const typename ParamGenerator<T4>::iterator end4_;
15930  typename ParamGenerator<T4>::iterator current4_;
15931  const typename ParamGenerator<T5>::iterator begin5_;
15932  const typename ParamGenerator<T5>::iterator end5_;
15933  typename ParamGenerator<T5>::iterator current5_;
15934  const typename ParamGenerator<T6>::iterator begin6_;
15935  const typename ParamGenerator<T6>::iterator end6_;
15936  typename ParamGenerator<T6>::iterator current6_;
15937  const typename ParamGenerator<T7>::iterator begin7_;
15938  const typename ParamGenerator<T7>::iterator end7_;
15939  typename ParamGenerator<T7>::iterator current7_;
15940  const typename ParamGenerator<T8>::iterator begin8_;
15941  const typename ParamGenerator<T8>::iterator end8_;
15942  typename ParamGenerator<T8>::iterator current8_;
15943  ParamType current_value_;
15944  }; // class CartesianProductGenerator8::Iterator
15945 
15946  // No implementation - assignment is unsupported.
15947  void operator=(const CartesianProductGenerator8 & other);
15948 
15949  const ParamGenerator<T1> g1_;
15950  const ParamGenerator<T2> g2_;
15951  const ParamGenerator<T3> g3_;
15952  const ParamGenerator<T4> g4_;
15953  const ParamGenerator<T5> g5_;
15954  const ParamGenerator<T6> g6_;
15955  const ParamGenerator<T7> g7_;
15956  const ParamGenerator<T8> g8_;
15957 }; // class CartesianProductGenerator8
15958 
15959 
15960 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15961  typename T6, typename T7, typename T8, typename T9>
15963  : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
15964  T7, T8, T9> >
15965 {
15966 public:
15967  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType;
15968 
15970  const ParamGenerator<T2> & g2, const ParamGenerator<T3> & g3,
15971  const ParamGenerator<T4> & g4, const ParamGenerator<T5> & g5,
15972  const ParamGenerator<T6> & g6, const ParamGenerator<T7> & g7,
15973  const ParamGenerator<T8> & g8, const ParamGenerator<T9> & g9)
15974  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
15975  g9_(g9) {}
15977 
15979  {
15980  return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
15981  g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
15982  g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin());
15983  }
15985  {
15986  return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
15987  g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
15988  g8_.end(), g9_, g9_.end());
15989  }
15990 
15991 private:
15992  class Iterator : public ParamIteratorInterface<ParamType>
15993  {
15994  public:
15996  const ParamGenerator<T1> & g1,
15997  const typename ParamGenerator<T1>::iterator & current1,
15998  const ParamGenerator<T2> & g2,
15999  const typename ParamGenerator<T2>::iterator & current2,
16000  const ParamGenerator<T3> & g3,
16001  const typename ParamGenerator<T3>::iterator & current3,
16002  const ParamGenerator<T4> & g4,
16003  const typename ParamGenerator<T4>::iterator & current4,
16004  const ParamGenerator<T5> & g5,
16005  const typename ParamGenerator<T5>::iterator & current5,
16006  const ParamGenerator<T6> & g6,
16007  const typename ParamGenerator<T6>::iterator & current6,
16008  const ParamGenerator<T7> & g7,
16009  const typename ParamGenerator<T7>::iterator & current7,
16010  const ParamGenerator<T8> & g8,
16011  const typename ParamGenerator<T8>::iterator & current8,
16012  const ParamGenerator<T9> & g9,
16013  const typename ParamGenerator<T9>::iterator & current9)
16014  : base_(base),
16015  begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
16016  begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
16017  begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
16018  begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
16019  begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
16020  begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
16021  begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
16022  begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
16023  begin9_(g9.begin()), end9_(g9.end()), current9_(current9)
16024  {
16025  ComputeCurrentValue();
16026  }
16027  virtual ~Iterator() {}
16028 
16030  {
16031  return base_;
16032  }
16033  // Advance should not be called on beyond-of-range iterators
16034  // so no component iterators must be beyond end of range, either.
16035  virtual void Advance()
16036  {
16037  assert(!AtEnd());
16038  ++current9_;
16039 
16040  if (current9_ == end9_)
16041  {
16042  current9_ = begin9_;
16043  ++current8_;
16044  }
16045 
16046  if (current8_ == end8_)
16047  {
16048  current8_ = begin8_;
16049  ++current7_;
16050  }
16051 
16052  if (current7_ == end7_)
16053  {
16054  current7_ = begin7_;
16055  ++current6_;
16056  }
16057 
16058  if (current6_ == end6_)
16059  {
16060  current6_ = begin6_;
16061  ++current5_;
16062  }
16063 
16064  if (current5_ == end5_)
16065  {
16066  current5_ = begin5_;
16067  ++current4_;
16068  }
16069 
16070  if (current4_ == end4_)
16071  {
16072  current4_ = begin4_;
16073  ++current3_;
16074  }
16075 
16076  if (current3_ == end3_)
16077  {
16078  current3_ = begin3_;
16079  ++current2_;
16080  }
16081 
16082  if (current2_ == end2_)
16083  {
16084  current2_ = begin2_;
16085  ++current1_;
16086  }
16087 
16088  ComputeCurrentValue();
16089  }
16091  {
16092  return new Iterator(*this);
16093  }
16094  virtual const ParamType * Current() const { return &current_value_; }
16095  virtual bool Equals(const ParamIteratorInterface<ParamType> & other) const
16096  {
16097  // Having the same base generator guarantees that the other
16098  // iterator is of the same type and we can downcast.
16099  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
16100  << "The program attempted to compare iterators "
16101  << "from different generators." << std::endl;
16102  const Iterator * typed_other =
16103  CheckedDowncastToActualType<const Iterator>(&other);
16104  // We must report iterators equal if they both point beyond their
16105  // respective ranges. That can happen in a variety of fashions,
16106  // so we have to consult AtEnd().
16107  return (AtEnd() && typed_other->AtEnd()) ||
16108  (
16109  current1_ == typed_other->current1_ &&
16110  current2_ == typed_other->current2_ &&
16111  current3_ == typed_other->current3_ &&
16112  current4_ == typed_other->current4_ &&
16113  current5_ == typed_other->current5_ &&
16114  current6_ == typed_other->current6_ &&
16115  current7_ == typed_other->current7_ &&
16116  current8_ == typed_other->current8_ &&
16117  current9_ == typed_other->current9_);
16118  }
16119 
16120  private:
16121  Iterator(const Iterator & other)
16122  : base_(other.base_),
16123  begin1_(other.begin1_),
16124  end1_(other.end1_),
16125  current1_(other.current1_),
16126  begin2_(other.begin2_),
16127  end2_(other.end2_),
16128  current2_(other.current2_),
16129  begin3_(other.begin3_),
16130  end3_(other.end3_),
16131  current3_(other.current3_),
16132  begin4_(other.begin4_),
16133  end4_(other.end4_),
16134  current4_(other.current4_),
16135  begin5_(other.begin5_),
16136  end5_(other.end5_),
16137  current5_(other.current5_),
16138  begin6_(other.begin6_),
16139  end6_(other.end6_),
16140  current6_(other.current6_),
16141  begin7_(other.begin7_),
16142  end7_(other.end7_),
16143  current7_(other.current7_),
16144  begin8_(other.begin8_),
16145  end8_(other.end8_),
16146  current8_(other.current8_),
16147  begin9_(other.begin9_),
16148  end9_(other.end9_),
16149  current9_(other.current9_)
16150  {
16151  ComputeCurrentValue();
16152  }
16153 
16155  {
16156  if (!AtEnd())
16157  current_value_ = ParamType(*current1_, *current2_, *current3_,
16158  *current4_, *current5_, *current6_, *current7_, *current8_,
16159  *current9_);
16160  }
16161  bool AtEnd() const
16162  {
16163  // We must report iterator past the end of the range when either of the
16164  // component iterators has reached the end of its range.
16165  return
16166  current1_ == end1_ ||
16167  current2_ == end2_ ||
16168  current3_ == end3_ ||
16169  current4_ == end4_ ||
16170  current5_ == end5_ ||
16171  current6_ == end6_ ||
16172  current7_ == end7_ ||
16173  current8_ == end8_ ||
16174  current9_ == end9_;
16175  }
16176 
16177  // No implementation - assignment is unsupported.
16178  void operator=(const Iterator & other);
16179 
16180  const ParamGeneratorInterface<ParamType> * const base_;
16181  // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
16182  // current[i]_ is the actual traversing iterator.
16183  const typename ParamGenerator<T1>::iterator begin1_;
16184  const typename ParamGenerator<T1>::iterator end1_;
16185  typename ParamGenerator<T1>::iterator current1_;
16186  const typename ParamGenerator<T2>::iterator begin2_;
16187  const typename ParamGenerator<T2>::iterator end2_;
16188  typename ParamGenerator<T2>::iterator current2_;
16189  const typename ParamGenerator<T3>::iterator begin3_;
16190  const typename ParamGenerator<T3>::iterator end3_;
16191  typename ParamGenerator<T3>::iterator current3_;
16192  const typename ParamGenerator<T4>::iterator begin4_;
16193  const typename ParamGenerator<T4>::iterator end4_;
16194  typename ParamGenerator<T4>::iterator current4_;
16195  const typename ParamGenerator<T5>::iterator begin5_;
16196  const typename ParamGenerator<T5>::iterator end5_;
16197  typename ParamGenerator<T5>::iterator current5_;
16198  const typename ParamGenerator<T6>::iterator begin6_;
16199  const typename ParamGenerator<T6>::iterator end6_;
16200  typename ParamGenerator<T6>::iterator current6_;
16201  const typename ParamGenerator<T7>::iterator begin7_;
16202  const typename ParamGenerator<T7>::iterator end7_;
16203  typename ParamGenerator<T7>::iterator current7_;
16204  const typename ParamGenerator<T8>::iterator begin8_;
16205  const typename ParamGenerator<T8>::iterator end8_;
16206  typename ParamGenerator<T8>::iterator current8_;
16207  const typename ParamGenerator<T9>::iterator begin9_;
16208  const typename ParamGenerator<T9>::iterator end9_;
16209  typename ParamGenerator<T9>::iterator current9_;
16210  ParamType current_value_;
16211  }; // class CartesianProductGenerator9::Iterator
16212 
16213  // No implementation - assignment is unsupported.
16214  void operator=(const CartesianProductGenerator9 & other);
16215 
16216  const ParamGenerator<T1> g1_;
16217  const ParamGenerator<T2> g2_;
16218  const ParamGenerator<T3> g3_;
16219  const ParamGenerator<T4> g4_;
16220  const ParamGenerator<T5> g5_;
16221  const ParamGenerator<T6> g6_;
16222  const ParamGenerator<T7> g7_;
16223  const ParamGenerator<T8> g8_;
16224  const ParamGenerator<T9> g9_;
16225 }; // class CartesianProductGenerator9
16226 
16227 
16228 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16229  typename T6, typename T7, typename T8, typename T9, typename T10>
16231  : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
16232  T7, T8, T9, T10> >
16233 {
16234 public:
16235  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType;
16236 
16238  const ParamGenerator<T2> & g2, const ParamGenerator<T3> & g3,
16239  const ParamGenerator<T4> & g4, const ParamGenerator<T5> & g5,
16240  const ParamGenerator<T6> & g6, const ParamGenerator<T7> & g7,
16241  const ParamGenerator<T8> & g8, const ParamGenerator<T9> & g9,
16242  const ParamGenerator<T10> & g10)
16243  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
16244  g9_(g9), g10_(g10) {}
16246 
16248  {
16249  return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
16250  g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
16251  g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin());
16252  }
16254  {
16255  return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
16256  g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
16257  g8_.end(), g9_, g9_.end(), g10_, g10_.end());
16258  }
16259 
16260 private:
16261  class Iterator : public ParamIteratorInterface<ParamType>
16262  {
16263  public:
16265  const ParamGenerator<T1> & g1,
16266  const typename ParamGenerator<T1>::iterator & current1,
16267  const ParamGenerator<T2> & g2,
16268  const typename ParamGenerator<T2>::iterator & current2,
16269  const ParamGenerator<T3> & g3,
16270  const typename ParamGenerator<T3>::iterator & current3,
16271  const ParamGenerator<T4> & g4,
16272  const typename ParamGenerator<T4>::iterator & current4,
16273  const ParamGenerator<T5> & g5,
16274  const typename ParamGenerator<T5>::iterator & current5,
16275  const ParamGenerator<T6> & g6,
16276  const typename ParamGenerator<T6>::iterator & current6,
16277  const ParamGenerator<T7> & g7,
16278  const typename ParamGenerator<T7>::iterator & current7,
16279  const ParamGenerator<T8> & g8,
16280  const typename ParamGenerator<T8>::iterator & current8,
16281  const ParamGenerator<T9> & g9,
16282  const typename ParamGenerator<T9>::iterator & current9,
16283  const ParamGenerator<T10> & g10,
16284  const typename ParamGenerator<T10>::iterator & current10)
16285  : base_(base),
16286  begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
16287  begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
16288  begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
16289  begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
16290  begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
16291  begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
16292  begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
16293  begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
16294  begin9_(g9.begin()), end9_(g9.end()), current9_(current9),
16295  begin10_(g10.begin()), end10_(g10.end()), current10_(current10)
16296  {
16297  ComputeCurrentValue();
16298  }
16299  virtual ~Iterator() {}
16300 
16302  {
16303  return base_;
16304  }
16305  // Advance should not be called on beyond-of-range iterators
16306  // so no component iterators must be beyond end of range, either.
16307  virtual void Advance()
16308  {
16309  assert(!AtEnd());
16310  ++current10_;
16311 
16312  if (current10_ == end10_)
16313  {
16314  current10_ = begin10_;
16315  ++current9_;
16316  }
16317 
16318  if (current9_ == end9_)
16319  {
16320  current9_ = begin9_;
16321  ++current8_;
16322  }
16323 
16324  if (current8_ == end8_)
16325  {
16326  current8_ = begin8_;
16327  ++current7_;
16328  }
16329 
16330  if (current7_ == end7_)
16331  {
16332  current7_ = begin7_;
16333  ++current6_;
16334  }
16335 
16336  if (current6_ == end6_)
16337  {
16338  current6_ = begin6_;
16339  ++current5_;
16340  }
16341 
16342  if (current5_ == end5_)
16343  {
16344  current5_ = begin5_;
16345  ++current4_;
16346  }
16347 
16348  if (current4_ == end4_)
16349  {
16350  current4_ = begin4_;
16351  ++current3_;
16352  }
16353 
16354  if (current3_ == end3_)
16355  {
16356  current3_ = begin3_;
16357  ++current2_;
16358  }
16359 
16360  if (current2_ == end2_)
16361  {
16362  current2_ = begin2_;
16363  ++current1_;
16364  }
16365 
16366  ComputeCurrentValue();
16367  }
16369  {
16370  return new Iterator(*this);
16371  }
16372  virtual const ParamType * Current() const { return &current_value_; }
16373  virtual bool Equals(const ParamIteratorInterface<ParamType> & other) const
16374  {
16375  // Having the same base generator guarantees that the other
16376  // iterator is of the same type and we can downcast.
16377  GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
16378  << "The program attempted to compare iterators "
16379  << "from different generators." << std::endl;
16380  const Iterator * typed_other =
16381  CheckedDowncastToActualType<const Iterator>(&other);
16382  // We must report iterators equal if they both point beyond their
16383  // respective ranges. That can happen in a variety of fashions,
16384  // so we have to consult AtEnd().
16385  return (AtEnd() && typed_other->AtEnd()) ||
16386  (
16387  current1_ == typed_other->current1_ &&
16388  current2_ == typed_other->current2_ &&
16389  current3_ == typed_other->current3_ &&
16390  current4_ == typed_other->current4_ &&
16391  current5_ == typed_other->current5_ &&
16392  current6_ == typed_other->current6_ &&
16393  current7_ == typed_other->current7_ &&
16394  current8_ == typed_other->current8_ &&
16395  current9_ == typed_other->current9_ &&
16396  current10_ == typed_other->current10_);
16397  }
16398 
16399  private:
16400  Iterator(const Iterator & other)
16401  : base_(other.base_),
16402  begin1_(other.begin1_),
16403  end1_(other.end1_),
16404  current1_(other.current1_),
16405  begin2_(other.begin2_),
16406  end2_(other.end2_),
16407  current2_(other.current2_),
16408  begin3_(other.begin3_),
16409  end3_(other.end3_),
16410  current3_(other.current3_),
16411  begin4_(other.begin4_),
16412  end4_(other.end4_),
16413  current4_(other.current4_),
16414  begin5_(other.begin5_),
16415  end5_(other.end5_),
16416  current5_(other.current5_),
16417  begin6_(other.begin6_),
16418  end6_(other.end6_),
16419  current6_(other.current6_),
16420  begin7_(other.begin7_),
16421  end7_(other.end7_),
16422  current7_(other.current7_),
16423  begin8_(other.begin8_),
16424  end8_(other.end8_),
16425  current8_(other.current8_),
16426  begin9_(other.begin9_),
16427  end9_(other.end9_),
16428  current9_(other.current9_),
16429  begin10_(other.begin10_),
16430  end10_(other.end10_),
16431  current10_(other.current10_)
16432  {
16433  ComputeCurrentValue();
16434  }
16435 
16437  {
16438  if (!AtEnd())
16439  current_value_ = ParamType(*current1_, *current2_, *current3_,
16440  *current4_, *current5_, *current6_, *current7_, *current8_,
16441  *current9_, *current10_);
16442  }
16443  bool AtEnd() const
16444  {
16445  // We must report iterator past the end of the range when either of the
16446  // component iterators has reached the end of its range.
16447  return
16448  current1_ == end1_ ||
16449  current2_ == end2_ ||
16450  current3_ == end3_ ||
16451  current4_ == end4_ ||
16452  current5_ == end5_ ||
16453  current6_ == end6_ ||
16454  current7_ == end7_ ||
16455  current8_ == end8_ ||
16456  current9_ == end9_ ||
16457  current10_ == end10_;
16458  }
16459 
16460  // No implementation - assignment is unsupported.
16461  void operator=(const Iterator & other);
16462 
16463  const ParamGeneratorInterface<ParamType> * const base_;
16464  // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
16465  // current[i]_ is the actual traversing iterator.
16466  const typename ParamGenerator<T1>::iterator begin1_;
16467  const typename ParamGenerator<T1>::iterator end1_;
16468  typename ParamGenerator<T1>::iterator current1_;
16469  const typename ParamGenerator<T2>::iterator begin2_;
16470  const typename ParamGenerator<T2>::iterator end2_;
16471  typename ParamGenerator<T2>::iterator current2_;
16472  const typename ParamGenerator<T3>::iterator begin3_;
16473  const typename ParamGenerator<T3>::iterator end3_;
16474  typename ParamGenerator<T3>::iterator current3_;
16475  const typename ParamGenerator<T4>::iterator begin4_;
16476  const typename ParamGenerator<T4>::iterator end4_;
16477  typename ParamGenerator<T4>::iterator current4_;
16478  const typename ParamGenerator<T5>::iterator begin5_;
16479  const typename ParamGenerator<T5>::iterator end5_;
16480  typename ParamGenerator<T5>::iterator current5_;
16481  const typename ParamGenerator<T6>::iterator begin6_;
16482  const typename ParamGenerator<T6>::iterator end6_;
16483  typename ParamGenerator<T6>::iterator current6_;
16484  const typename ParamGenerator<T7>::iterator begin7_;
16485  const typename ParamGenerator<T7>::iterator end7_;
16486  typename ParamGenerator<T7>::iterator current7_;
16487  const typename ParamGenerator<T8>::iterator begin8_;
16488  const typename ParamGenerator<T8>::iterator end8_;
16489  typename ParamGenerator<T8>::iterator current8_;
16490  const typename ParamGenerator<T9>::iterator begin9_;
16491  const typename ParamGenerator<T9>::iterator end9_;
16492  typename ParamGenerator<T9>::iterator current9_;
16493  const typename ParamGenerator<T10>::iterator begin10_;
16494  const typename ParamGenerator<T10>::iterator end10_;
16495  typename ParamGenerator<T10>::iterator current10_;
16496  ParamType current_value_;
16497  }; // class CartesianProductGenerator10::Iterator
16498 
16499  // No implementation - assignment is unsupported.
16500  void operator=(const CartesianProductGenerator10 & other);
16501 
16502  const ParamGenerator<T1> g1_;
16503  const ParamGenerator<T2> g2_;
16504  const ParamGenerator<T3> g3_;
16505  const ParamGenerator<T4> g4_;
16506  const ParamGenerator<T5> g5_;
16507  const ParamGenerator<T6> g6_;
16508  const ParamGenerator<T7> g7_;
16509  const ParamGenerator<T8> g8_;
16510  const ParamGenerator<T9> g9_;
16511  const ParamGenerator<T10> g10_;
16512 }; // class CartesianProductGenerator10
16513 
16514 
16515 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
16516 //
16517 // Helper classes providing Combine() with polymorphic features. They allow
16518 // casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is
16519 // convertible to U.
16520 //
16521 template <class Generator1, class Generator2>
16523 {
16524 public:
16525  CartesianProductHolder2(const Generator1 & g1, const Generator2 & g2)
16526  : g1_(g1), g2_(g2) {}
16527  template <typename T1, typename T2>
16529  {
16532  static_cast<ParamGenerator<T1> >(g1_),
16533  static_cast<ParamGenerator<T2> >(g2_)));
16534  }
16535 
16536 private:
16537  // No implementation - assignment is unsupported.
16538  void operator=(const CartesianProductHolder2 & other);
16539 
16540  const Generator1 g1_;
16541  const Generator2 g2_;
16542 }; // class CartesianProductHolder2
16543 
16544 template <class Generator1, class Generator2, class Generator3>
16546 {
16547 public:
16548  CartesianProductHolder3(const Generator1 & g1, const Generator2 & g2,
16549  const Generator3 & g3)
16550  : g1_(g1), g2_(g2), g3_(g3) {}
16551  template <typename T1, typename T2, typename T3>
16553  {
16556  static_cast<ParamGenerator<T1> >(g1_),
16557  static_cast<ParamGenerator<T2> >(g2_),
16558  static_cast<ParamGenerator<T3> >(g3_)));
16559  }
16560 
16561 private:
16562  // No implementation - assignment is unsupported.
16563  void operator=(const CartesianProductHolder3 & other);
16564 
16565  const Generator1 g1_;
16566  const Generator2 g2_;
16567  const Generator3 g3_;
16568 }; // class CartesianProductHolder3
16569 
16570 template <class Generator1, class Generator2, class Generator3,
16571  class Generator4>
16573 {
16574 public:
16575  CartesianProductHolder4(const Generator1 & g1, const Generator2 & g2,
16576  const Generator3 & g3, const Generator4 & g4)
16577  : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
16578  template <typename T1, typename T2, typename T3, typename T4>
16580  {
16583  static_cast<ParamGenerator<T1> >(g1_),
16584  static_cast<ParamGenerator<T2> >(g2_),
16585  static_cast<ParamGenerator<T3> >(g3_),
16586  static_cast<ParamGenerator<T4> >(g4_)));
16587  }
16588 
16589 private:
16590  // No implementation - assignment is unsupported.
16591  void operator=(const CartesianProductHolder4 & other);
16592 
16593  const Generator1 g1_;
16594  const Generator2 g2_;
16595  const Generator3 g3_;
16596  const Generator4 g4_;
16597 }; // class CartesianProductHolder4
16598 
16599 template <class Generator1, class Generator2, class Generator3,
16600  class Generator4, class Generator5>
16602 {
16603 public:
16604  CartesianProductHolder5(const Generator1 & g1, const Generator2 & g2,
16605  const Generator3 & g3, const Generator4 & g4, const Generator5 & g5)
16606  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
16607  template <typename T1, typename T2, typename T3, typename T4, typename T5>
16609  {
16612  static_cast<ParamGenerator<T1> >(g1_),
16613  static_cast<ParamGenerator<T2> >(g2_),
16614  static_cast<ParamGenerator<T3> >(g3_),
16615  static_cast<ParamGenerator<T4> >(g4_),
16616  static_cast<ParamGenerator<T5> >(g5_)));
16617  }
16618 
16619 private:
16620  // No implementation - assignment is unsupported.
16621  void operator=(const CartesianProductHolder5 & other);
16622 
16623  const Generator1 g1_;
16624  const Generator2 g2_;
16625  const Generator3 g3_;
16626  const Generator4 g4_;
16627  const Generator5 g5_;
16628 }; // class CartesianProductHolder5
16629 
16630 template <class Generator1, class Generator2, class Generator3,
16631  class Generator4, class Generator5, class Generator6>
16633 {
16634 public:
16635  CartesianProductHolder6(const Generator1 & g1, const Generator2 & g2,
16636  const Generator3 & g3, const Generator4 & g4, const Generator5 & g5,
16637  const Generator6 & g6)
16638  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
16639  template <typename T1, typename T2, typename T3, typename T4, typename T5,
16640  typename T6>
16642  {
16645  static_cast<ParamGenerator<T1> >(g1_),
16646  static_cast<ParamGenerator<T2> >(g2_),
16647  static_cast<ParamGenerator<T3> >(g3_),
16648  static_cast<ParamGenerator<T4> >(g4_),
16649  static_cast<ParamGenerator<T5> >(g5_),
16650  static_cast<ParamGenerator<T6> >(g6_)));
16651  }
16652 
16653 private:
16654  // No implementation - assignment is unsupported.
16655  void operator=(const CartesianProductHolder6 & other);
16656 
16657  const Generator1 g1_;
16658  const Generator2 g2_;
16659  const Generator3 g3_;
16660  const Generator4 g4_;
16661  const Generator5 g5_;
16662  const Generator6 g6_;
16663 }; // class CartesianProductHolder6
16664 
16665 template <class Generator1, class Generator2, class Generator3,
16666  class Generator4, class Generator5, class Generator6, class Generator7>
16668 {
16669 public:
16670  CartesianProductHolder7(const Generator1 & g1, const Generator2 & g2,
16671  const Generator3 & g3, const Generator4 & g4, const Generator5 & g5,
16672  const Generator6 & g6, const Generator7 & g7)
16673  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
16674  template <typename T1, typename T2, typename T3, typename T4, typename T5,
16675  typename T6, typename T7>
16676  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
16677  T7> >() const
16678  {
16681  static_cast<ParamGenerator<T1> >(g1_),
16682  static_cast<ParamGenerator<T2> >(g2_),
16683  static_cast<ParamGenerator<T3> >(g3_),
16684  static_cast<ParamGenerator<T4> >(g4_),
16685  static_cast<ParamGenerator<T5> >(g5_),
16686  static_cast<ParamGenerator<T6> >(g6_),
16687  static_cast<ParamGenerator<T7> >(g7_)));
16688  }
16689 
16690 private:
16691  // No implementation - assignment is unsupported.
16692  void operator=(const CartesianProductHolder7 & other);
16693 
16694  const Generator1 g1_;
16695  const Generator2 g2_;
16696  const Generator3 g3_;
16697  const Generator4 g4_;
16698  const Generator5 g5_;
16699  const Generator6 g6_;
16700  const Generator7 g7_;
16701 }; // class CartesianProductHolder7
16702 
16703 template <class Generator1, class Generator2, class Generator3,
16704  class Generator4, class Generator5, class Generator6, class Generator7,
16705  class Generator8>
16707 {
16708 public:
16709  CartesianProductHolder8(const Generator1 & g1, const Generator2 & g2,
16710  const Generator3 & g3, const Generator4 & g4, const Generator5 & g5,
16711  const Generator6 & g6, const Generator7 & g7, const Generator8 & g8)
16712  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
16713  g8_(g8) {}
16714  template <typename T1, typename T2, typename T3, typename T4, typename T5,
16715  typename T6, typename T7, typename T8>
16716  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7,
16717  T8> >() const
16718  {
16721  static_cast<ParamGenerator<T1> >(g1_),
16722  static_cast<ParamGenerator<T2> >(g2_),
16723  static_cast<ParamGenerator<T3> >(g3_),
16724  static_cast<ParamGenerator<T4> >(g4_),
16725  static_cast<ParamGenerator<T5> >(g5_),
16726  static_cast<ParamGenerator<T6> >(g6_),
16727  static_cast<ParamGenerator<T7> >(g7_),
16728  static_cast<ParamGenerator<T8> >(g8_)));
16729  }
16730 
16731 private:
16732  // No implementation - assignment is unsupported.
16733  void operator=(const CartesianProductHolder8 & other);
16734 
16735  const Generator1 g1_;
16736  const Generator2 g2_;
16737  const Generator3 g3_;
16738  const Generator4 g4_;
16739  const Generator5 g5_;
16740  const Generator6 g6_;
16741  const Generator7 g7_;
16742  const Generator8 g8_;
16743 }; // class CartesianProductHolder8
16744 
16745 template <class Generator1, class Generator2, class Generator3,
16746  class Generator4, class Generator5, class Generator6, class Generator7,
16747  class Generator8, class Generator9>
16749 {
16750 public:
16751  CartesianProductHolder9(const Generator1 & g1, const Generator2 & g2,
16752  const Generator3 & g3, const Generator4 & g4, const Generator5 & g5,
16753  const Generator6 & g6, const Generator7 & g7, const Generator8 & g8,
16754  const Generator9 & g9)
16755  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
16756  g9_(g9) {}
16757  template <typename T1, typename T2, typename T3, typename T4, typename T5,
16758  typename T6, typename T7, typename T8, typename T9>
16759  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
16760  T9> >() const
16761  {
16762  return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
16763  T9> >(
16765  static_cast<ParamGenerator<T1> >(g1_),
16766  static_cast<ParamGenerator<T2> >(g2_),
16767  static_cast<ParamGenerator<T3> >(g3_),
16768  static_cast<ParamGenerator<T4> >(g4_),
16769  static_cast<ParamGenerator<T5> >(g5_),
16770  static_cast<ParamGenerator<T6> >(g6_),
16771  static_cast<ParamGenerator<T7> >(g7_),
16772  static_cast<ParamGenerator<T8> >(g8_),
16773  static_cast<ParamGenerator<T9> >(g9_)));
16774  }
16775 
16776 private:
16777  // No implementation - assignment is unsupported.
16778  void operator=(const CartesianProductHolder9 & other);
16779 
16780  const Generator1 g1_;
16781  const Generator2 g2_;
16782  const Generator3 g3_;
16783  const Generator4 g4_;
16784  const Generator5 g5_;
16785  const Generator6 g6_;
16786  const Generator7 g7_;
16787  const Generator8 g8_;
16788  const Generator9 g9_;
16789 }; // class CartesianProductHolder9
16790 
16791 template <class Generator1, class Generator2, class Generator3,
16792  class Generator4, class Generator5, class Generator6, class Generator7,
16793  class Generator8, class Generator9, class Generator10>
16795 {
16796 public:
16797  CartesianProductHolder10(const Generator1 & g1, const Generator2 & g2,
16798  const Generator3 & g3, const Generator4 & g4, const Generator5 & g5,
16799  const Generator6 & g6, const Generator7 & g7, const Generator8 & g8,
16800  const Generator9 & g9, const Generator10 & g10)
16801  : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
16802  g9_(g9), g10_(g10) {}
16803  template <typename T1, typename T2, typename T3, typename T4, typename T5,
16804  typename T6, typename T7, typename T8, typename T9, typename T10>
16805  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
16806  T9, T10> >() const
16807  {
16808  return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
16809  T9, T10> >(
16810  new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
16811  T10>(
16812  static_cast<ParamGenerator<T1> >(g1_),
16813  static_cast<ParamGenerator<T2> >(g2_),
16814  static_cast<ParamGenerator<T3> >(g3_),
16815  static_cast<ParamGenerator<T4> >(g4_),
16816  static_cast<ParamGenerator<T5> >(g5_),
16817  static_cast<ParamGenerator<T6> >(g6_),
16818  static_cast<ParamGenerator<T7> >(g7_),
16819  static_cast<ParamGenerator<T8> >(g8_),
16820  static_cast<ParamGenerator<T9> >(g9_),
16821  static_cast<ParamGenerator<T10> >(g10_)));
16822  }
16823 
16824 private:
16825  // No implementation - assignment is unsupported.
16826  void operator=(const CartesianProductHolder10 & other);
16827 
16828  const Generator1 g1_;
16829  const Generator2 g2_;
16830  const Generator3 g3_;
16831  const Generator4 g4_;
16832  const Generator5 g5_;
16833  const Generator6 g6_;
16834  const Generator7 g7_;
16835  const Generator8 g8_;
16836  const Generator9 g9_;
16837  const Generator10 g10_;
16838 }; // class CartesianProductHolder10
16839 
16840 # endif // GTEST_HAS_COMBINE
16841 
16842 } // namespace internal
16843 } // namespace testing
16844 
16845 #endif // GTEST_HAS_PARAM_TEST
16846 
16847 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
16848 
16849 #if GTEST_HAS_PARAM_TEST
16850 
16851 namespace testing
16852 {
16853 
16854 // Functions producing parameter generators.
16855 //
16856 // Google Test uses these generators to produce parameters for value-
16857 // parameterized tests. When a parameterized test case is instantiated
16858 // with a particular generator, Google Test creates and runs tests
16859 // for each element in the sequence produced by the generator.
16860 //
16861 // In the following sample, tests from test case FooTest are instantiated
16862 // each three times with parameter values 3, 5, and 8:
16863 //
16864 // class FooTest : public TestWithParam<int> { ... };
16865 //
16866 // TEST_P(FooTest, TestThis) {
16867 // }
16868 // TEST_P(FooTest, TestThat) {
16869 // }
16870 // INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
16871 //
16872 
16873 // Range() returns generators providing sequences of values in a range.
16874 //
16875 // Synopsis:
16876 // Range(start, end)
16877 // - returns a generator producing a sequence of values {start, start+1,
16878 // start+2, ..., }.
16879 // Range(start, end, step)
16880 // - returns a generator producing a sequence of values {start, start+step,
16881 // start+step+step, ..., }.
16882 // Notes:
16883 // * The generated sequences never include end. For example, Range(1, 5)
16884 // returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
16885 // returns a generator producing {1, 3, 5, 7}.
16886 // * start and end must have the same type. That type may be any integral or
16887 // floating-point type or a user defined type satisfying these conditions:
16888 // * It must be assignable (have operator=() defined).
16889 // * It must have operator+() (operator+(int-compatible type) for
16890 // two-operand version).
16891 // * It must have operator<() defined.
16892 // Elements in the resulting sequences will also have that type.
16893 // * Condition start < end must be satisfied in order for resulting sequences
16894 // to contain any elements.
16895 //
16896 template <typename T, typename IncrementT>
16897 internal::ParamGenerator<T> Range(T start, T end, IncrementT step)
16898 {
16900  new internal::RangeGenerator<T, IncrementT>(start, end, step));
16901 }
16902 
16903 template <typename T>
16904 internal::ParamGenerator<T> Range(T start, T end)
16905 {
16906  return Range(start, end, 1);
16907 }
16908 
16909 // ValuesIn() function allows generation of tests with parameters coming from
16910 // a container.
16911 //
16912 // Synopsis:
16913 // ValuesIn(const T (&array)[N])
16914 // - returns a generator producing sequences with elements from
16915 // a C-style array.
16916 // ValuesIn(const Container& container)
16917 // - returns a generator producing sequences with elements from
16918 // an STL-style container.
16919 // ValuesIn(Iterator begin, Iterator end)
16920 // - returns a generator producing sequences with elements from
16921 // a range [begin, end) defined by a pair of STL-style iterators. These
16922 // iterators can also be plain C pointers.
16923 //
16924 // Please note that ValuesIn copies the values from the containers
16925 // passed in and keeps them to generate tests in RUN_ALL_TESTS().
16926 //
16927 // Examples:
16928 //
16929 // This instantiates tests from test case StringTest
16930 // each with C-string values of "foo", "bar", and "baz":
16931 //
16932 // const char* strings[] = {"foo", "bar", "baz"};
16933 // INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
16934 //
16935 // This instantiates tests from test case StlStringTest
16936 // each with STL strings with values "a" and "b":
16937 //
16938 // ::std::vector< ::std::string> GetParameterStrings() {
16939 // ::std::vector< ::std::string> v;
16940 // v.push_back("a");
16941 // v.push_back("b");
16942 // return v;
16943 // }
16944 //
16945 // INSTANTIATE_TEST_CASE_P(CharSequence,
16946 // StlStringTest,
16947 // ValuesIn(GetParameterStrings()));
16948 //
16949 //
16950 // This will also instantiate tests from CharTest
16951 // each with parameter values 'a' and 'b':
16952 //
16953 // ::std::list<char> GetParameterChars() {
16954 // ::std::list<char> list;
16955 // list.push_back('a');
16956 // list.push_back('b');
16957 // return list;
16958 // }
16959 // ::std::list<char> l = GetParameterChars();
16960 // INSTANTIATE_TEST_CASE_P(CharSequence2,
16961 // CharTest,
16962 // ValuesIn(l.begin(), l.end()));
16963 //
16964 template <typename ForwardIterator>
16966 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type >
16967 ValuesIn(ForwardIterator begin, ForwardIterator end)
16968 {
16969  typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
16970  ::value_type ParamType;
16973 }
16974 
16975 template <typename T, size_t N>
16976 internal::ParamGenerator<T> ValuesIn(const T(&array)[N])
16977 {
16978  return ValuesIn(array, array + N);
16979 }
16980 
16981 template <class Container>
16983  const Container & container)
16984 {
16985  return ValuesIn(container.begin(), container.end());
16986 }
16987 
16988 // Values() allows generating tests from explicitly specified list of
16989 // parameters.
16990 //
16991 // Synopsis:
16992 // Values(T v1, T v2, ..., T vN)
16993 // - returns a generator producing sequences with elements v1, v2, ..., vN.
16994 //
16995 // For example, this instantiates tests from test case BarTest each
16996 // with values "one", "two", and "three":
16997 //
16998 // INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
16999 //
17000 // This instantiates tests from test case BazTest each with values 1, 2, 3.5.
17001 // The exact type of values will depend on the type of parameter in BazTest.
17002 //
17003 // INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
17004 //
17005 // Currently, Values() supports from 1 to 50 parameters.
17006 //
17007 template <typename T1>
17009 {
17010  return internal::ValueArray1<T1>(v1);
17011 }
17012 
17013 template <typename T1, typename T2>
17015 {
17016  return internal::ValueArray2<T1, T2>(v1, v2);
17017 }
17018 
17019 template <typename T1, typename T2, typename T3>
17020 internal::ValueArray3<T1, T2, T3> Values(T1 v1, T2 v2, T3 v3)
17021 {
17022  return internal::ValueArray3<T1, T2, T3>(v1, v2, v3);
17023 }
17024 
17025 template <typename T1, typename T2, typename T3, typename T4>
17026 internal::ValueArray4<T1, T2, T3, T4> Values(T1 v1, T2 v2, T3 v3, T4 v4)
17027 {
17028  return internal::ValueArray4<T1, T2, T3, T4>(v1, v2, v3, v4);
17029 }
17030 
17031 template <typename T1, typename T2, typename T3, typename T4, typename T5>
17032 internal::ValueArray5<T1, T2, T3, T4, T5> Values(T1 v1, T2 v2, T3 v3, T4 v4,
17033  T5 v5)
17034 {
17035  return internal::ValueArray5<T1, T2, T3, T4, T5>(v1, v2, v3, v4, v5);
17036 }
17037 
17038 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17039  typename T6>
17041  T4 v4, T5 v5, T6 v6)
17042 {
17043  return internal::ValueArray6<T1, T2, T3, T4, T5, T6>(v1, v2, v3, v4, v5, v6);
17044 }
17045 
17046 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17047  typename T6, typename T7>
17049  T4 v4, T5 v5, T6 v6, T7 v7)
17050 {
17051  return internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7>(v1, v2, v3, v4, v5,
17052  v6, v7);
17053 }
17054 
17055 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17056  typename T6, typename T7, typename T8>
17058  T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8)
17059 {
17061  v5, v6, v7, v8);
17062 }
17063 
17064 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17065  typename T6, typename T7, typename T8, typename T9>
17067  T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9)
17068 {
17070  v4, v5, v6, v7, v8, v9);
17071 }
17072 
17073 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17074  typename T6, typename T7, typename T8, typename T9, typename T10>
17076  T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10)
17077 {
17079  v2, v3, v4, v5, v6, v7, v8, v9, v10);
17080 }
17081 
17082 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17083  typename T6, typename T7, typename T8, typename T9, typename T10,
17084  typename T11>
17085 internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
17086  T11> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17087  T10 v10, T11 v11)
17088 {
17089  return internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
17090  T11>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
17091 }
17092 
17093 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17094  typename T6, typename T7, typename T8, typename T9, typename T10,
17095  typename T11, typename T12>
17096 internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17097  T12> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17098  T10 v10, T11 v11, T12 v12)
17099 {
17100  return internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17101  T12>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
17102 }
17103 
17104 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17105  typename T6, typename T7, typename T8, typename T9, typename T10,
17106  typename T11, typename T12, typename T13>
17107 internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
17108  T13> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17109  T10 v10, T11 v11, T12 v12, T13 v13)
17110 {
17111  return internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17112  T12, T13>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
17113 }
17114 
17115 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17116  typename T6, typename T7, typename T8, typename T9, typename T10,
17117  typename T11, typename T12, typename T13, typename T14>
17118 internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17119  T14> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17120  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14)
17121 {
17122  return internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17123  T12, T13, T14>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
17124  v14);
17125 }
17126 
17127 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17128  typename T6, typename T7, typename T8, typename T9, typename T10,
17129  typename T11, typename T12, typename T13, typename T14, typename T15>
17130 internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17131  T14, T15> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
17132  T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15)
17133 {
17134  return internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17135  T12, T13, T14, T15>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
17136  v13, v14, v15);
17137 }
17138 
17139 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17140  typename T6, typename T7, typename T8, typename T9, typename T10,
17141  typename T11, typename T12, typename T13, typename T14, typename T15,
17142  typename T16>
17143 internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17144  T14, T15, T16> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
17145  T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
17146  T16 v16)
17147 {
17148  return internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17149  T12, T13, T14, T15, T16>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
17150  v12, v13, v14, v15, v16);
17151 }
17152 
17153 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17154  typename T6, typename T7, typename T8, typename T9, typename T10,
17155  typename T11, typename T12, typename T13, typename T14, typename T15,
17156  typename T16, typename T17>
17157 internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17158  T14, T15, T16, T17> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
17159  T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
17160  T16 v16, T17 v17)
17161 {
17162  return internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17163  T12, T13, T14, T15, T16, T17>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
17164  v11, v12, v13, v14, v15, v16, v17);
17165 }
17166 
17167 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17168  typename T6, typename T7, typename T8, typename T9, typename T10,
17169  typename T11, typename T12, typename T13, typename T14, typename T15,
17170  typename T16, typename T17, typename T18>
17171 internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17172  T14, T15, T16, T17, T18> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
17173  T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
17174  T16 v16, T17 v17, T18 v18)
17175 {
17176  return internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17177  T12, T13, T14, T15, T16, T17, T18>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
17178  v10, v11, v12, v13, v14, v15, v16, v17, v18);
17179 }
17180 
17181 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17182  typename T6, typename T7, typename T8, typename T9, typename T10,
17183  typename T11, typename T12, typename T13, typename T14, typename T15,
17184  typename T16, typename T17, typename T18, typename T19>
17185 internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17186  T14, T15, T16, T17, T18, T19> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
17187  T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
17188  T15 v15, T16 v16, T17 v17, T18 v18, T19 v19)
17189 {
17190  return internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17191  T12, T13, T14, T15, T16, T17, T18, T19>(v1, v2, v3, v4, v5, v6, v7, v8,
17192  v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19);
17193 }
17194 
17195 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17196  typename T6, typename T7, typename T8, typename T9, typename T10,
17197  typename T11, typename T12, typename T13, typename T14, typename T15,
17198  typename T16, typename T17, typename T18, typename T19, typename T20>
17199 internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17200  T14, T15, T16, T17, T18, T19, T20> Values(T1 v1, T2 v2, T3 v3, T4 v4,
17201  T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
17202  T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20)
17203 {
17204  return internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17205  T12, T13, T14, T15, T16, T17, T18, T19, T20>(v1, v2, v3, v4, v5, v6, v7,
17206  v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20);
17207 }
17208 
17209 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17210  typename T6, typename T7, typename T8, typename T9, typename T10,
17211  typename T11, typename T12, typename T13, typename T14, typename T15,
17212  typename T16, typename T17, typename T18, typename T19, typename T20,
17213  typename T21>
17214 internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17215  T14, T15, T16, T17, T18, T19, T20, T21> Values(T1 v1, T2 v2, T3 v3, T4 v4,
17216  T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
17217  T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21)
17218 {
17219  return internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17220  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(v1, v2, v3, v4, v5, v6,
17221  v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21);
17222 }
17223 
17224 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17225  typename T6, typename T7, typename T8, typename T9, typename T10,
17226  typename T11, typename T12, typename T13, typename T14, typename T15,
17227  typename T16, typename T17, typename T18, typename T19, typename T20,
17228  typename T21, typename T22>
17229 internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17230  T14, T15, T16, T17, T18, T19, T20, T21, T22> Values(T1 v1, T2 v2, T3 v3,
17231  T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
17232  T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
17233  T21 v21, T22 v22)
17234 {
17235  return internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17236  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>(v1, v2, v3, v4,
17237  v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
17238  v20, v21, v22);
17239 }
17240 
17241 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17242  typename T6, typename T7, typename T8, typename T9, typename T10,
17243  typename T11, typename T12, typename T13, typename T14, typename T15,
17244  typename T16, typename T17, typename T18, typename T19, typename T20,
17245  typename T21, typename T22, typename T23>
17246 internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17247  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Values(T1 v1, T2 v2,
17248  T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
17249  T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
17250  T21 v21, T22 v22, T23 v23)
17251 {
17252  return internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17253  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23>(v1, v2, v3,
17254  v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
17255  v20, v21, v22, v23);
17256 }
17257 
17258 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17259  typename T6, typename T7, typename T8, typename T9, typename T10,
17260  typename T11, typename T12, typename T13, typename T14, typename T15,
17261  typename T16, typename T17, typename T18, typename T19, typename T20,
17262  typename T21, typename T22, typename T23, typename T24>
17263 internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17264  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Values(T1 v1, T2 v2,
17265  T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
17266  T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
17267  T21 v21, T22 v22, T23 v23, T24 v24)
17268 {
17269  return internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17270  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24>(v1, v2,
17271  v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
17272  v19, v20, v21, v22, v23, v24);
17273 }
17274 
17275 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17276  typename T6, typename T7, typename T8, typename T9, typename T10,
17277  typename T11, typename T12, typename T13, typename T14, typename T15,
17278  typename T16, typename T17, typename T18, typename T19, typename T20,
17279  typename T21, typename T22, typename T23, typename T24, typename T25>
17280 internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17281  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Values(T1 v1,
17282  T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
17283  T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
17284  T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25)
17285 {
17286  return internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17287  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25>(v1,
17288  v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
17289  v18, v19, v20, v21, v22, v23, v24, v25);
17290 }
17291 
17292 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17293  typename T6, typename T7, typename T8, typename T9, typename T10,
17294  typename T11, typename T12, typename T13, typename T14, typename T15,
17295  typename T16, typename T17, typename T18, typename T19, typename T20,
17296  typename T21, typename T22, typename T23, typename T24, typename T25,
17297  typename T26>
17298 internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17299  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17300  T26> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17301  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
17302  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
17303  T26 v26)
17304 {
17305  return internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17306  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17307  T26>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
17308  v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26);
17309 }
17310 
17311 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17312  typename T6, typename T7, typename T8, typename T9, typename T10,
17313  typename T11, typename T12, typename T13, typename T14, typename T15,
17314  typename T16, typename T17, typename T18, typename T19, typename T20,
17315  typename T21, typename T22, typename T23, typename T24, typename T25,
17316  typename T26, typename T27>
17317 internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17318  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
17319  T27> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17320  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
17321  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
17322  T26 v26, T27 v27)
17323 {
17324  return internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17325  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17326  T26, T27>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
17327  v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);
17328 }
17329 
17330 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17331  typename T6, typename T7, typename T8, typename T9, typename T10,
17332  typename T11, typename T12, typename T13, typename T14, typename T15,
17333  typename T16, typename T17, typename T18, typename T19, typename T20,
17334  typename T21, typename T22, typename T23, typename T24, typename T25,
17335  typename T26, typename T27, typename T28>
17336 internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17337  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
17338  T28> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17339  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
17340  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
17341  T26 v26, T27 v27, T28 v28)
17342 {
17343  return internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17344  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17345  T26, T27, T28>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
17346  v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
17347  v28);
17348 }
17349 
17350 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17351  typename T6, typename T7, typename T8, typename T9, typename T10,
17352  typename T11, typename T12, typename T13, typename T14, typename T15,
17353  typename T16, typename T17, typename T18, typename T19, typename T20,
17354  typename T21, typename T22, typename T23, typename T24, typename T25,
17355  typename T26, typename T27, typename T28, typename T29>
17356 internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17357  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17358  T29> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17359  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
17360  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
17361  T26 v26, T27 v27, T28 v28, T29 v29)
17362 {
17363  return internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17364  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17365  T26, T27, T28, T29>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
17366  v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
17367  v27, v28, v29);
17368 }
17369 
17370 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17371  typename T6, typename T7, typename T8, typename T9, typename T10,
17372  typename T11, typename T12, typename T13, typename T14, typename T15,
17373  typename T16, typename T17, typename T18, typename T19, typename T20,
17374  typename T21, typename T22, typename T23, typename T24, typename T25,
17375  typename T26, typename T27, typename T28, typename T29, typename T30>
17376 internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17377  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17378  T29, T30> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
17379  T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
17380  T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
17381  T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30)
17382 {
17383  return internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17384  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17385  T26, T27, T28, T29, T30>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
17386  v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
17387  v26, v27, v28, v29, v30);
17388 }
17389 
17390 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17391  typename T6, typename T7, typename T8, typename T9, typename T10,
17392  typename T11, typename T12, typename T13, typename T14, typename T15,
17393  typename T16, typename T17, typename T18, typename T19, typename T20,
17394  typename T21, typename T22, typename T23, typename T24, typename T25,
17395  typename T26, typename T27, typename T28, typename T29, typename T30,
17396  typename T31>
17397 internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17398  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17399  T29, T30, T31> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
17400  T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
17401  T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
17402  T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31)
17403 {
17404  return internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17405  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17406  T26, T27, T28, T29, T30, T31>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
17407  v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
17408  v25, v26, v27, v28, v29, v30, v31);
17409 }
17410 
17411 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17412  typename T6, typename T7, typename T8, typename T9, typename T10,
17413  typename T11, typename T12, typename T13, typename T14, typename T15,
17414  typename T16, typename T17, typename T18, typename T19, typename T20,
17415  typename T21, typename T22, typename T23, typename T24, typename T25,
17416  typename T26, typename T27, typename T28, typename T29, typename T30,
17417  typename T31, typename T32>
17418 internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17419  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17420  T29, T30, T31, T32> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
17421  T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
17422  T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
17423  T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
17424  T32 v32)
17425 {
17426  return internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17427  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17428  T26, T27, T28, T29, T30, T31, T32>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
17429  v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
17430  v24, v25, v26, v27, v28, v29, v30, v31, v32);
17431 }
17432 
17433 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17434  typename T6, typename T7, typename T8, typename T9, typename T10,
17435  typename T11, typename T12, typename T13, typename T14, typename T15,
17436  typename T16, typename T17, typename T18, typename T19, typename T20,
17437  typename T21, typename T22, typename T23, typename T24, typename T25,
17438  typename T26, typename T27, typename T28, typename T29, typename T30,
17439  typename T31, typename T32, typename T33>
17440 internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17441  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17442  T29, T30, T31, T32, T33> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
17443  T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
17444  T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
17445  T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
17446  T32 v32, T33 v33)
17447 {
17448  return internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17449  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17450  T26, T27, T28, T29, T30, T31, T32, T33>(v1, v2, v3, v4, v5, v6, v7, v8,
17451  v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
17452  v24, v25, v26, v27, v28, v29, v30, v31, v32, v33);
17453 }
17454 
17455 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17456  typename T6, typename T7, typename T8, typename T9, typename T10,
17457  typename T11, typename T12, typename T13, typename T14, typename T15,
17458  typename T16, typename T17, typename T18, typename T19, typename T20,
17459  typename T21, typename T22, typename T23, typename T24, typename T25,
17460  typename T26, typename T27, typename T28, typename T29, typename T30,
17461  typename T31, typename T32, typename T33, typename T34>
17462 internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17463  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17464  T29, T30, T31, T32, T33, T34> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
17465  T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
17466  T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
17467  T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
17468  T31 v31, T32 v32, T33 v33, T34 v34)
17469 {
17470  return internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17471  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17472  T26, T27, T28, T29, T30, T31, T32, T33, T34>(v1, v2, v3, v4, v5, v6, v7,
17473  v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
17474  v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34);
17475 }
17476 
17477 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17478  typename T6, typename T7, typename T8, typename T9, typename T10,
17479  typename T11, typename T12, typename T13, typename T14, typename T15,
17480  typename T16, typename T17, typename T18, typename T19, typename T20,
17481  typename T21, typename T22, typename T23, typename T24, typename T25,
17482  typename T26, typename T27, typename T28, typename T29, typename T30,
17483  typename T31, typename T32, typename T33, typename T34, typename T35>
17484 internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17485  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17486  T29, T30, T31, T32, T33, T34, T35> Values(T1 v1, T2 v2, T3 v3, T4 v4,
17487  T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
17488  T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
17489  T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
17490  T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35)
17491 {
17492  return internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17493  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17494  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35>(v1, v2, v3, v4, v5, v6,
17495  v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
17496  v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35);
17497 }
17498 
17499 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17500  typename T6, typename T7, typename T8, typename T9, typename T10,
17501  typename T11, typename T12, typename T13, typename T14, typename T15,
17502  typename T16, typename T17, typename T18, typename T19, typename T20,
17503  typename T21, typename T22, typename T23, typename T24, typename T25,
17504  typename T26, typename T27, typename T28, typename T29, typename T30,
17505  typename T31, typename T32, typename T33, typename T34, typename T35,
17506  typename T36>
17507 internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17508  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17509  T29, T30, T31, T32, T33, T34, T35, T36> Values(T1 v1, T2 v2, T3 v3, T4 v4,
17510  T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
17511  T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
17512  T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
17513  T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36)
17514 {
17515  return internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17516  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17517  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36>(v1, v2, v3, v4,
17518  v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
17519  v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
17520  v34, v35, v36);
17521 }
17522 
17523 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17524  typename T6, typename T7, typename T8, typename T9, typename T10,
17525  typename T11, typename T12, typename T13, typename T14, typename T15,
17526  typename T16, typename T17, typename T18, typename T19, typename T20,
17527  typename T21, typename T22, typename T23, typename T24, typename T25,
17528  typename T26, typename T27, typename T28, typename T29, typename T30,
17529  typename T31, typename T32, typename T33, typename T34, typename T35,
17530  typename T36, typename T37>
17531 internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17532  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17533  T29, T30, T31, T32, T33, T34, T35, T36, T37> Values(T1 v1, T2 v2, T3 v3,
17534  T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
17535  T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
17536  T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
17537  T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
17538  T37 v37)
17539 {
17540  return internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17541  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17542  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37>(v1, v2, v3,
17543  v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
17544  v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
17545  v34, v35, v36, v37);
17546 }
17547 
17548 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17549  typename T6, typename T7, typename T8, typename T9, typename T10,
17550  typename T11, typename T12, typename T13, typename T14, typename T15,
17551  typename T16, typename T17, typename T18, typename T19, typename T20,
17552  typename T21, typename T22, typename T23, typename T24, typename T25,
17553  typename T26, typename T27, typename T28, typename T29, typename T30,
17554  typename T31, typename T32, typename T33, typename T34, typename T35,
17555  typename T36, typename T37, typename T38>
17556 internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17557  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17558  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Values(T1 v1, T2 v2,
17559  T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
17560  T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
17561  T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
17562  T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
17563  T37 v37, T38 v38)
17564 {
17565  return internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17566  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17567  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38>(v1, v2,
17568  v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
17569  v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32,
17570  v33, v34, v35, v36, v37, v38);
17571 }
17572 
17573 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17574  typename T6, typename T7, typename T8, typename T9, typename T10,
17575  typename T11, typename T12, typename T13, typename T14, typename T15,
17576  typename T16, typename T17, typename T18, typename T19, typename T20,
17577  typename T21, typename T22, typename T23, typename T24, typename T25,
17578  typename T26, typename T27, typename T28, typename T29, typename T30,
17579  typename T31, typename T32, typename T33, typename T34, typename T35,
17580  typename T36, typename T37, typename T38, typename T39>
17581 internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17582  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17583  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Values(T1 v1, T2 v2,
17584  T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
17585  T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
17586  T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
17587  T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
17588  T37 v37, T38 v38, T39 v39)
17589 {
17590  return internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17591  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17592  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39>(v1,
17593  v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
17594  v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31,
17595  v32, v33, v34, v35, v36, v37, v38, v39);
17596 }
17597 
17598 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17599  typename T6, typename T7, typename T8, typename T9, typename T10,
17600  typename T11, typename T12, typename T13, typename T14, typename T15,
17601  typename T16, typename T17, typename T18, typename T19, typename T20,
17602  typename T21, typename T22, typename T23, typename T24, typename T25,
17603  typename T26, typename T27, typename T28, typename T29, typename T30,
17604  typename T31, typename T32, typename T33, typename T34, typename T35,
17605  typename T36, typename T37, typename T38, typename T39, typename T40>
17606 internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17607  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17608  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Values(T1 v1,
17609  T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
17610  T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
17611  T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27,
17612  T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35,
17613  T36 v36, T37 v37, T38 v38, T39 v39, T40 v40)
17614 {
17615  return internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17616  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17617  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17618  T40>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
17619  v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29,
17620  v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40);
17621 }
17622 
17623 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17624  typename T6, typename T7, typename T8, typename T9, typename T10,
17625  typename T11, typename T12, typename T13, typename T14, typename T15,
17626  typename T16, typename T17, typename T18, typename T19, typename T20,
17627  typename T21, typename T22, typename T23, typename T24, typename T25,
17628  typename T26, typename T27, typename T28, typename T29, typename T30,
17629  typename T31, typename T32, typename T33, typename T34, typename T35,
17630  typename T36, typename T37, typename T38, typename T39, typename T40,
17631  typename T41>
17632 internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17633  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17634  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
17635  T41> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17636  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
17637  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
17638  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
17639  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41)
17640 {
17641  return internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17642  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17643  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17644  T40, T41>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
17645  v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28,
17646  v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41);
17647 }
17648 
17649 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17650  typename T6, typename T7, typename T8, typename T9, typename T10,
17651  typename T11, typename T12, typename T13, typename T14, typename T15,
17652  typename T16, typename T17, typename T18, typename T19, typename T20,
17653  typename T21, typename T22, typename T23, typename T24, typename T25,
17654  typename T26, typename T27, typename T28, typename T29, typename T30,
17655  typename T31, typename T32, typename T33, typename T34, typename T35,
17656  typename T36, typename T37, typename T38, typename T39, typename T40,
17657  typename T41, typename T42>
17658 internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17659  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17660  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
17661  T42> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17662  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
17663  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
17664  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
17665  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
17666  T42 v42)
17667 {
17668  return internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17669  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17670  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17671  T40, T41, T42>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
17672  v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
17673  v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41,
17674  v42);
17675 }
17676 
17677 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17678  typename T6, typename T7, typename T8, typename T9, typename T10,
17679  typename T11, typename T12, typename T13, typename T14, typename T15,
17680  typename T16, typename T17, typename T18, typename T19, typename T20,
17681  typename T21, typename T22, typename T23, typename T24, typename T25,
17682  typename T26, typename T27, typename T28, typename T29, typename T30,
17683  typename T31, typename T32, typename T33, typename T34, typename T35,
17684  typename T36, typename T37, typename T38, typename T39, typename T40,
17685  typename T41, typename T42, typename T43>
17686 internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17687  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17688  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
17689  T43> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17690  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
17691  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
17692  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
17693  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
17694  T42 v42, T43 v43)
17695 {
17696  return internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17697  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17698  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17699  T40, T41, T42, T43>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
17700  v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
17701  v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40,
17702  v41, v42, v43);
17703 }
17704 
17705 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17706  typename T6, typename T7, typename T8, typename T9, typename T10,
17707  typename T11, typename T12, typename T13, typename T14, typename T15,
17708  typename T16, typename T17, typename T18, typename T19, typename T20,
17709  typename T21, typename T22, typename T23, typename T24, typename T25,
17710  typename T26, typename T27, typename T28, typename T29, typename T30,
17711  typename T31, typename T32, typename T33, typename T34, typename T35,
17712  typename T36, typename T37, typename T38, typename T39, typename T40,
17713  typename T41, typename T42, typename T43, typename T44>
17714 internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17715  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17716  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
17717  T44> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
17718  T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
17719  T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
17720  T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
17721  T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
17722  T42 v42, T43 v43, T44 v44)
17723 {
17724  return internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17725  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17726  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17727  T40, T41, T42, T43, T44>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
17728  v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
17729  v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39,
17730  v40, v41, v42, v43, v44);
17731 }
17732 
17733 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17734  typename T6, typename T7, typename T8, typename T9, typename T10,
17735  typename T11, typename T12, typename T13, typename T14, typename T15,
17736  typename T16, typename T17, typename T18, typename T19, typename T20,
17737  typename T21, typename T22, typename T23, typename T24, typename T25,
17738  typename T26, typename T27, typename T28, typename T29, typename T30,
17739  typename T31, typename T32, typename T33, typename T34, typename T35,
17740  typename T36, typename T37, typename T38, typename T39, typename T40,
17741  typename T41, typename T42, typename T43, typename T44, typename T45>
17742 internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17743  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17744  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
17745  T44, T45> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
17746  T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
17747  T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
17748  T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
17749  T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
17750  T41 v41, T42 v42, T43 v43, T44 v44, T45 v45)
17751 {
17752  return internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17753  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17754  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17755  T40, T41, T42, T43, T44, T45>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
17756  v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
17757  v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38,
17758  v39, v40, v41, v42, v43, v44, v45);
17759 }
17760 
17761 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17762  typename T6, typename T7, typename T8, typename T9, typename T10,
17763  typename T11, typename T12, typename T13, typename T14, typename T15,
17764  typename T16, typename T17, typename T18, typename T19, typename T20,
17765  typename T21, typename T22, typename T23, typename T24, typename T25,
17766  typename T26, typename T27, typename T28, typename T29, typename T30,
17767  typename T31, typename T32, typename T33, typename T34, typename T35,
17768  typename T36, typename T37, typename T38, typename T39, typename T40,
17769  typename T41, typename T42, typename T43, typename T44, typename T45,
17770  typename T46>
17771 internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17772  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17773  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
17774  T44, T45, T46> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
17775  T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
17776  T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
17777  T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
17778  T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
17779  T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46)
17780 {
17781  return internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17782  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17783  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17784  T40, T41, T42, T43, T44, T45, T46>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
17785  v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
17786  v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
17787  v38, v39, v40, v41, v42, v43, v44, v45, v46);
17788 }
17789 
17790 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17791  typename T6, typename T7, typename T8, typename T9, typename T10,
17792  typename T11, typename T12, typename T13, typename T14, typename T15,
17793  typename T16, typename T17, typename T18, typename T19, typename T20,
17794  typename T21, typename T22, typename T23, typename T24, typename T25,
17795  typename T26, typename T27, typename T28, typename T29, typename T30,
17796  typename T31, typename T32, typename T33, typename T34, typename T35,
17797  typename T36, typename T37, typename T38, typename T39, typename T40,
17798  typename T41, typename T42, typename T43, typename T44, typename T45,
17799  typename T46, typename T47>
17800 internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17801  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17802  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
17803  T44, T45, T46, T47> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
17804  T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
17805  T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
17806  T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
17807  T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
17808  T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47)
17809 {
17810  return internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17811  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17812  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17813  T40, T41, T42, T43, T44, T45, T46, T47>(v1, v2, v3, v4, v5, v6, v7, v8,
17814  v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
17815  v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
17816  v38, v39, v40, v41, v42, v43, v44, v45, v46, v47);
17817 }
17818 
17819 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17820  typename T6, typename T7, typename T8, typename T9, typename T10,
17821  typename T11, typename T12, typename T13, typename T14, typename T15,
17822  typename T16, typename T17, typename T18, typename T19, typename T20,
17823  typename T21, typename T22, typename T23, typename T24, typename T25,
17824  typename T26, typename T27, typename T28, typename T29, typename T30,
17825  typename T31, typename T32, typename T33, typename T34, typename T35,
17826  typename T36, typename T37, typename T38, typename T39, typename T40,
17827  typename T41, typename T42, typename T43, typename T44, typename T45,
17828  typename T46, typename T47, typename T48>
17829 internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17830  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17831  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
17832  T44, T45, T46, T47, T48> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
17833  T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
17834  T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
17835  T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
17836  T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
17837  T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47,
17838  T48 v48)
17839 {
17840  return internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17841  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17842  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17843  T40, T41, T42, T43, T44, T45, T46, T47, T48>(v1, v2, v3, v4, v5, v6, v7,
17844  v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
17845  v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36,
17846  v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48);
17847 }
17848 
17849 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17850  typename T6, typename T7, typename T8, typename T9, typename T10,
17851  typename T11, typename T12, typename T13, typename T14, typename T15,
17852  typename T16, typename T17, typename T18, typename T19, typename T20,
17853  typename T21, typename T22, typename T23, typename T24, typename T25,
17854  typename T26, typename T27, typename T28, typename T29, typename T30,
17855  typename T31, typename T32, typename T33, typename T34, typename T35,
17856  typename T36, typename T37, typename T38, typename T39, typename T40,
17857  typename T41, typename T42, typename T43, typename T44, typename T45,
17858  typename T46, typename T47, typename T48, typename T49>
17859 internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17860  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17861  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
17862  T44, T45, T46, T47, T48, T49> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
17863  T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
17864  T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
17865  T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
17866  T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38,
17867  T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46,
17868  T47 v47, T48 v48, T49 v49)
17869 {
17870  return internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17871  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17872  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17873  T40, T41, T42, T43, T44, T45, T46, T47, T48, T49>(v1, v2, v3, v4, v5, v6,
17874  v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
17875  v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35,
17876  v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49);
17877 }
17878 
17879 template <typename T1, typename T2, typename T3, typename T4, typename T5,
17880  typename T6, typename T7, typename T8, typename T9, typename T10,
17881  typename T11, typename T12, typename T13, typename T14, typename T15,
17882  typename T16, typename T17, typename T18, typename T19, typename T20,
17883  typename T21, typename T22, typename T23, typename T24, typename T25,
17884  typename T26, typename T27, typename T28, typename T29, typename T30,
17885  typename T31, typename T32, typename T33, typename T34, typename T35,
17886  typename T36, typename T37, typename T38, typename T39, typename T40,
17887  typename T41, typename T42, typename T43, typename T44, typename T45,
17888  typename T46, typename T47, typename T48, typename T49, typename T50>
17889 internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
17890  T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
17891  T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
17892  T44, T45, T46, T47, T48, T49, T50> Values(T1 v1, T2 v2, T3 v3, T4 v4,
17893  T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
17894  T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
17895  T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
17896  T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37,
17897  T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45,
17898  T46 v46, T47 v47, T48 v48, T49 v49, T50 v50)
17899 {
17900  return internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
17901  T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
17902  T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
17903  T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>(v1, v2, v3, v4,
17904  v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
17905  v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
17906  v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47,
17907  v48, v49, v50);
17908 }
17909 
17910 // Bool() allows generating tests with parameters in a set of (false, true).
17911 //
17912 // Synopsis:
17913 // Bool()
17914 // - returns a generator producing sequences with elements {false, true}.
17915 //
17916 // It is useful when testing code that depends on Boolean flags. Combinations
17917 // of multiple flags can be tested when several Bool()'s are combined using
17918 // Combine() function.
17919 //
17920 // In the following example all tests in the test case FlagDependentTest
17921 // will be instantiated twice with parameters false and true.
17922 //
17923 // class FlagDependentTest : public testing::TestWithParam<bool> {
17924 // virtual void SetUp() {
17925 // external_flag = GetParam();
17926 // }
17927 // }
17928 // INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
17929 //
17931 {
17932  return Values(false, true);
17933 }
17934 
17935 # if GTEST_HAS_COMBINE
17936 // Combine() allows the user to combine two or more sequences to produce
17937 // values of a Cartesian product of those sequences' elements.
17938 //
17939 // Synopsis:
17940 // Combine(gen1, gen2, ..., genN)
17941 // - returns a generator producing sequences with elements coming from
17942 // the Cartesian product of elements from the sequences generated by
17943 // gen1, gen2, ..., genN. The sequence elements will have a type of
17944 // tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
17945 // of elements from sequences produces by gen1, gen2, ..., genN.
17946 //
17947 // Combine can have up to 10 arguments. This number is currently limited
17948 // by the maximum number of elements in the tuple implementation used by Google
17949 // Test.
17950 //
17951 // Example:
17952 //
17953 // This will instantiate tests in test case AnimalTest each one with
17954 // the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
17955 // tuple("dog", BLACK), and tuple("dog", WHITE):
17956 //
17957 // enum Color { BLACK, GRAY, WHITE };
17958 // class AnimalTest
17959 // : public testing::TestWithParam<tuple<const char*, Color> > {...};
17960 //
17961 // TEST_P(AnimalTest, AnimalLooksNice) {...}
17962 //
17963 // INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
17964 // Combine(Values("cat", "dog"),
17965 // Values(BLACK, WHITE)));
17966 //
17967 // This will instantiate tests in FlagDependentTest with all variations of two
17968 // Boolean flags:
17969 //
17970 // class FlagDependentTest
17971 // : public testing::TestWithParam<tuple<bool, bool> > {
17972 // virtual void SetUp() {
17973 // // Assigns external_flag_1 and external_flag_2 values from the tuple.
17974 // tie(external_flag_1, external_flag_2) = GetParam();
17975 // }
17976 // };
17977 //
17978 // TEST_P(FlagDependentTest, TestFeature1) {
17979 // // Test your code using external_flag_1 and external_flag_2 here.
17980 // }
17981 // INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
17982 // Combine(Bool(), Bool()));
17983 //
17984 template <typename Generator1, typename Generator2>
17986  const Generator1 & g1, const Generator2 & g2)
17987 {
17989  g1, g2);
17990 }
17991 
17992 template <typename Generator1, typename Generator2, typename Generator3>
17994  const Generator1 & g1, const Generator2 & g2, const Generator3 & g3)
17995 {
17997  g1, g2, g3);
17998 }
17999 
18000 template <typename Generator1, typename Generator2, typename Generator3,
18001  typename Generator4>
18002 internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
18003  Generator4> Combine(
18004  const Generator1 & g1, const Generator2 & g2, const Generator3 & g3,
18005  const Generator4 & g4)
18006 {
18007  return internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
18008  Generator4>(
18009  g1, g2, g3, g4);
18010 }
18011 
18012 template <typename Generator1, typename Generator2, typename Generator3,
18013  typename Generator4, typename Generator5>
18014 internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
18015  Generator4, Generator5> Combine(
18016  const Generator1 & g1, const Generator2 & g2, const Generator3 & g3,
18017  const Generator4 & g4, const Generator5 & g5)
18018 {
18019  return internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
18020  Generator4, Generator5>(
18021  g1, g2, g3, g4, g5);
18022 }
18023 
18024 template <typename Generator1, typename Generator2, typename Generator3,
18025  typename Generator4, typename Generator5, typename Generator6>
18026 internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
18027  Generator4, Generator5, Generator6> Combine(
18028  const Generator1 & g1, const Generator2 & g2, const Generator3 & g3,
18029  const Generator4 & g4, const Generator5 & g5, const Generator6 & g6)
18030 {
18031  return internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
18032  Generator4, Generator5, Generator6>(
18033  g1, g2, g3, g4, g5, g6);
18034 }
18035 
18036 template <typename Generator1, typename Generator2, typename Generator3,
18037  typename Generator4, typename Generator5, typename Generator6,
18038  typename Generator7>
18039 internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
18040  Generator4, Generator5, Generator6, Generator7> Combine(
18041  const Generator1 & g1, const Generator2 & g2, const Generator3 & g3,
18042  const Generator4 & g4, const Generator5 & g5, const Generator6 & g6,
18043  const Generator7 & g7)
18044 {
18045  return internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
18046  Generator4, Generator5, Generator6, Generator7>(
18047  g1, g2, g3, g4, g5, g6, g7);
18048 }
18049 
18050 template <typename Generator1, typename Generator2, typename Generator3,
18051  typename Generator4, typename Generator5, typename Generator6,
18052  typename Generator7, typename Generator8>
18053 internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
18054  Generator4, Generator5, Generator6, Generator7, Generator8> Combine(
18055  const Generator1 & g1, const Generator2 & g2, const Generator3 & g3,
18056  const Generator4 & g4, const Generator5 & g5, const Generator6 & g6,
18057  const Generator7 & g7, const Generator8 & g8)
18058 {
18059  return internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
18060  Generator4, Generator5, Generator6, Generator7, Generator8>(
18061  g1, g2, g3, g4, g5, g6, g7, g8);
18062 }
18063 
18064 template <typename Generator1, typename Generator2, typename Generator3,
18065  typename Generator4, typename Generator5, typename Generator6,
18066  typename Generator7, typename Generator8, typename Generator9>
18067 internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
18068  Generator4, Generator5, Generator6, Generator7, Generator8,
18069  Generator9> Combine(
18070  const Generator1 & g1, const Generator2 & g2, const Generator3 & g3,
18071  const Generator4 & g4, const Generator5 & g5, const Generator6 & g6,
18072  const Generator7 & g7, const Generator8 & g8, const Generator9 & g9)
18073 {
18074  return internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
18075  Generator4, Generator5, Generator6, Generator7, Generator8, Generator9>(
18076  g1, g2, g3, g4, g5, g6, g7, g8, g9);
18077 }
18078 
18079 template <typename Generator1, typename Generator2, typename Generator3,
18080  typename Generator4, typename Generator5, typename Generator6,
18081  typename Generator7, typename Generator8, typename Generator9,
18082  typename Generator10>
18083 internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
18084  Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
18085  Generator10> Combine(
18086  const Generator1 & g1, const Generator2 & g2, const Generator3 & g3,
18087  const Generator4 & g4, const Generator5 & g5, const Generator6 & g6,
18088  const Generator7 & g7, const Generator8 & g8, const Generator9 & g9,
18089  const Generator10 & g10)
18090 {
18091  return internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
18092  Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
18093  Generator10>(
18094  g1, g2, g3, g4, g5, g6, g7, g8, g9, g10);
18095 }
18096 # endif // GTEST_HAS_COMBINE
18097 
18098 
18099 
18100 # define TEST_P(test_case_name, test_name) \
18101  class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
18102  : public test_case_name { \
18103  public: \
18104  GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
18105  virtual void TestBody(); \
18106  private: \
18107  static int AddToRegistry() { \
18108  ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
18109  GetTestCasePatternHolder<test_case_name>(\
18110  #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
18111  #test_case_name, \
18112  #test_name, \
18113  new ::testing::internal::TestMetaFactory< \
18114  GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
18115  return 0; \
18116  } \
18117  static int gtest_registering_dummy_; \
18118  GTEST_DISALLOW_COPY_AND_ASSIGN_(\
18119  GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
18120  }; \
18121  int GTEST_TEST_CLASS_NAME_(test_case_name, \
18122  test_name)::gtest_registering_dummy_ = \
18123  GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
18124  void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
18125 
18126 # define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
18127  ::testing::internal::ParamGenerator<test_case_name::ParamType> \
18128  gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
18129  int gtest_##prefix##test_case_name##_dummy_ = \
18130  ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
18131  GetTestCasePatternHolder<test_case_name>(\
18132  #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
18133  #prefix, \
18134  &gtest_##prefix##test_case_name##_EvalGenerator_, \
18135  __FILE__, __LINE__)
18136 
18137 } // namespace testing
18138 
18139 #endif // GTEST_HAS_PARAM_TEST
18140 
18141 #endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
18142 // Copyright 2006, Google Inc.
18143 // All rights reserved.
18144 //
18145 // Redistribution and use in source and binary forms, with or without
18146 // modification, are permitted provided that the following conditions are
18147 // met:
18148 //
18149 // * Redistributions of source code must retain the above copyright
18150 // notice, this list of conditions and the following disclaimer.
18151 // * Redistributions in binary form must reproduce the above
18152 // copyright notice, this list of conditions and the following disclaimer
18153 // in the documentation and/or other materials provided with the
18154 // distribution.
18155 // * Neither the name of Google Inc. nor the names of its
18156 // contributors may be used to endorse or promote products derived from
18157 // this software without specific prior written permission.
18158 //
18159 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18160 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18161 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18162 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18163 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18164 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18165 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18166 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18167 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18168 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18169 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18170 //
18171 // Author: wan@google.com (Zhanyong Wan)
18172 //
18173 // Google C++ Testing Framework definitions useful in production code.
18174 
18175 #ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
18176 #define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
18177 
18178 // When you need to test the private or protected members of a class,
18179 // use the FRIEND_TEST macro to declare your tests as friends of the
18180 // class. For example:
18181 //
18182 // class MyClass {
18183 // private:
18184 // void MyMethod();
18185 // FRIEND_TEST(MyClassTest, MyMethod);
18186 // };
18187 //
18188 // class MyClassTest : public testing::Test {
18189 // // ...
18190 // };
18191 //
18192 // TEST_F(MyClassTest, MyMethod) {
18193 // // Can call MyClass::MyMethod() here.
18194 // }
18195 
18196 #define FRIEND_TEST(test_case_name, test_name)\
18197 friend class test_case_name##_##test_name##_Test
18198 
18199 #endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_
18200 // Copyright 2008, Google Inc.
18201 // All rights reserved.
18202 //
18203 // Redistribution and use in source and binary forms, with or without
18204 // modification, are permitted provided that the following conditions are
18205 // met:
18206 //
18207 // * Redistributions of source code must retain the above copyright
18208 // notice, this list of conditions and the following disclaimer.
18209 // * Redistributions in binary form must reproduce the above
18210 // copyright notice, this list of conditions and the following disclaimer
18211 // in the documentation and/or other materials provided with the
18212 // distribution.
18213 // * Neither the name of Google Inc. nor the names of its
18214 // contributors may be used to endorse or promote products derived from
18215 // this software without specific prior written permission.
18216 //
18217 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18218 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18219 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18220 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18221 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18222 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18223 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18224 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18225 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18226 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18227 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18228 //
18229 // Author: mheule@google.com (Markus Heule)
18230 //
18231 
18232 #ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
18233 #define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
18234 
18235 #include <iosfwd>
18236 #include <vector>
18237 
18238 namespace testing
18239 {
18240 
18241 // A copyable object representing the result of a test part (i.e. an
18242 // assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()).
18243 //
18244 // Don't inherit from TestPartResult as its destructor is not virtual.
18245 class GTEST_API_ TestPartResult
18246 {
18247 public:
18248  // The possible outcomes of a test part (i.e. an assertion or an
18249  // explicit SUCCEED(), FAIL(), or ADD_FAILURE()).
18250  enum Type
18251  {
18252  kSuccess, // Succeeded.
18253  kNonFatalFailure, // Failed but the test can continue.
18254  kFatalFailure // Failed and the test should be terminated.
18255  };
18256 
18257  // C'tor. TestPartResult does NOT have a default constructor.
18258  // Always use this constructor (with parameters) to create a
18259  // TestPartResult object.
18261  const char * a_file_name,
18262  int a_line_number,
18263  const char * a_message)
18264  : type_(a_type),
18265  file_name_(a_file_name == NULL ? "" : a_file_name),
18266  line_number_(a_line_number),
18267  summary_(ExtractSummary(a_message)),
18268  message_(a_message)
18269  {
18270  }
18271 
18272  // Gets the outcome of the test part.
18273  Type type() const { return type_; }
18274 
18275  // Gets the name of the source file where the test part took place, or
18276  // NULL if it's unknown.
18277  const char * file_name() const
18278  {
18279  return file_name_.empty() ? NULL : file_name_.c_str();
18280  }
18281 
18282  // Gets the line in the source file where the test part took place,
18283  // or -1 if it's unknown.
18284  int line_number() const { return line_number_; }
18285 
18286  // Gets the summary of the failure message.
18287  const char * summary() const { return summary_.c_str(); }
18288 
18289  // Gets the message associated with the test part.
18290  const char * message() const { return message_.c_str(); }
18291 
18292  // Returns true iff the test part passed.
18293  bool passed() const { return type_ == kSuccess; }
18294 
18295  // Returns true iff the test part failed.
18296  bool failed() const { return type_ != kSuccess; }
18297 
18298  // Returns true iff the test part non-fatally failed.
18299  bool nonfatally_failed() const { return type_ == kNonFatalFailure; }
18300 
18301  // Returns true iff the test part fatally failed.
18302  bool fatally_failed() const { return type_ == kFatalFailure; }
18303 
18304 private:
18305  Type type_;
18306 
18307  // Gets the summary of the failure message by omitting the stack
18308  // trace in it.
18309  static std::string ExtractSummary(const char * message);
18310 
18311  // The name of the source file where the test part took place, or
18312  // "" if the source file is unknown.
18313  std::string file_name_;
18314  // The line in the source file where the test part took place, or -1
18315  // if the line number is unknown.
18316  int line_number_;
18317  std::string summary_; // The test failure summary.
18318  std::string message_; // The test failure message.
18319 };
18320 
18321 // Prints a TestPartResult object.
18322 std::ostream & operator<<(std::ostream & os, const TestPartResult & result);
18323 
18324 // An array of TestPartResult objects.
18325 //
18326 // Don't inherit from TestPartResultArray as its destructor is not
18327 // virtual.
18328 class GTEST_API_ TestPartResultArray
18329 {
18330 public:
18332 
18333  // Appends the given TestPartResult to the array.
18334  void Append(const TestPartResult & result);
18335 
18336  // Returns the TestPartResult at the given index (0-based).
18337  const TestPartResult & GetTestPartResult(int index) const;
18338 
18339  // Returns the number of TestPartResult objects in the array.
18340  int size() const;
18341 
18342 private:
18343  std::vector<TestPartResult> array_;
18344 
18345  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray);
18346 };
18347 
18348 // This interface knows how to report a test part result.
18350 {
18351 public:
18353 
18354  virtual void ReportTestPartResult(const TestPartResult & result) = 0;
18355 };
18356 
18357 namespace internal
18358 {
18359 
18360 // This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a
18361 // statement generates new fatal failures. To do so it registers itself as the
18362 // current test part result reporter. Besides checking if fatal failures were
18363 // reported, it only delegates the reporting to the former result reporter.
18364 // The original result reporter is restored in the destructor.
18365 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18366 class GTEST_API_ HasNewFatalFailureHelper
18368 {
18369 public:
18370  HasNewFatalFailureHelper();
18371  virtual ~HasNewFatalFailureHelper();
18372  virtual void ReportTestPartResult(const TestPartResult & result);
18373  bool has_new_fatal_failure() const { return has_new_fatal_failure_; }
18374 private:
18375  bool has_new_fatal_failure_;
18376  TestPartResultReporterInterface * original_reporter_;
18377 
18378  GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper);
18379 };
18380 
18381 } // namespace internal
18382 
18383 } // namespace testing
18384 
18385 #endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
18386 // Copyright 2008 Google Inc.
18387 // All Rights Reserved.
18388 //
18389 // Redistribution and use in source and binary forms, with or without
18390 // modification, are permitted provided that the following conditions are
18391 // met:
18392 //
18393 // * Redistributions of source code must retain the above copyright
18394 // notice, this list of conditions and the following disclaimer.
18395 // * Redistributions in binary form must reproduce the above
18396 // copyright notice, this list of conditions and the following disclaimer
18397 // in the documentation and/or other materials provided with the
18398 // distribution.
18399 // * Neither the name of Google Inc. nor the names of its
18400 // contributors may be used to endorse or promote products derived from
18401 // this software without specific prior written permission.
18402 //
18403 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18404 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18405 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18406 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18407 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18408 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18409 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18410 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18411 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18412 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18413 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18414 //
18415 // Author: wan@google.com (Zhanyong Wan)
18416 
18417 #ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
18418 #define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
18419 
18420 // This header implements typed tests and type-parameterized tests.
18421 
18422 // Typed (aka type-driven) tests repeat the same test for types in a
18423 // list. You must know which types you want to test with when writing
18424 // typed tests. Here's how you do it:
18425 
18426 #if 0
18427 
18428 // First, define a fixture class template. It should be parameterized
18429 // by a type. Remember to derive it from testing::Test.
18430 template <typename T>
18431 class FooTest : public testing::Test
18432 {
18433 public:
18434  ...
18435  typedef std::list<T> List;
18436  static T shared_;
18437  T value_;
18438 };
18439 
18440 // Next, associate a list of types with the test case, which will be
18441 // repeated for each type in the list. The typedef is necessary for
18442 // the macro to parse correctly.
18443 typedef testing::Types<char, int, unsigned int> MyTypes;
18444 TYPED_TEST_CASE(FooTest, MyTypes);
18445 
18446 // If the type list contains only one type, you can write that type
18447 // directly without Types<...>:
18448 // TYPED_TEST_CASE(FooTest, int);
18449 
18450 // Then, use TYPED_TEST() instead of TEST_F() to define as many typed
18451 // tests for this test case as you want.
18452 TYPED_TEST(FooTest, DoesBlah)
18453 {
18454  // Inside a test, refer to TypeParam to get the type parameter.
18455  // Since we are inside a derived class template, C++ requires use to
18456  // visit the members of FooTest via 'this'.
18457  TypeParam n = this->value_;
18458 
18459  // To visit static members of the fixture, add the TestFixture::
18460  // prefix.
18461  n += TestFixture::shared_;
18462 
18463  // To refer to typedefs in the fixture, add the "typename
18464  // TestFixture::" prefix.
18465  typename TestFixture::List values;
18466  values.push_back(n);
18467  ...
18468 }
18469 
18470 TYPED_TEST(FooTest, HasPropertyA) { ... }
18471 
18472 #endif // 0
18473 
18474 // Type-parameterized tests are abstract test patterns parameterized
18475 // by a type. Compared with typed tests, type-parameterized tests
18476 // allow you to define the test pattern without knowing what the type
18477 // parameters are. The defined pattern can be instantiated with
18478 // different types any number of times, in any number of translation
18479 // units.
18480 //
18481 // If you are designing an interface or concept, you can define a
18482 // suite of type-parameterized tests to verify properties that any
18483 // valid implementation of the interface/concept should have. Then,
18484 // each implementation can easily instantiate the test suite to verify
18485 // that it conforms to the requirements, without having to write
18486 // similar tests repeatedly. Here's an example:
18487 
18488 #if 0
18489 
18490 // First, define a fixture class template. It should be parameterized
18491 // by a type. Remember to derive it from testing::Test.
18492 template <typename T>
18493 class FooTest : public testing::Test
18494 {
18495  ...
18496 };
18497 
18498 // Next, declare that you will define a type-parameterized test case
18499 // (the _P suffix is for "parameterized" or "pattern", whichever you
18500 // prefer):
18501 TYPED_TEST_CASE_P(FooTest);
18502 
18503 // Then, use TYPED_TEST_P() to define as many type-parameterized tests
18504 // for this type-parameterized test case as you want.
18505 TYPED_TEST_P(FooTest, DoesBlah)
18506 {
18507  // Inside a test, refer to TypeParam to get the type parameter.
18508  TypeParam n = 0;
18509  ...
18510 }
18511 
18512 TYPED_TEST_P(FooTest, HasPropertyA) { ... }
18513 
18514 // Now the tricky part: you need to register all test patterns before
18515 // you can instantiate them. The first argument of the macro is the
18516 // test case name; the rest are the names of the tests in this test
18517 // case.
18519  DoesBlah, HasPropertyA);
18520 
18521 // Finally, you are free to instantiate the pattern with the types you
18522 // want. If you put the above code in a header file, you can #include
18523 // it in multiple C++ source files and instantiate it multiple times.
18524 //
18525 // To distinguish different instances of the pattern, the first
18526 // argument to the INSTANTIATE_* macro is a prefix that will be added
18527 // to the actual test case name. Remember to pick unique prefixes for
18528 // different instances.
18529 typedef testing::Types<char, int, unsigned int> MyTypes;
18530 INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
18531 
18532 // If the type list contains only one type, you can write that type
18533 // directly without Types<...>:
18534 // INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int);
18535 
18536 #endif // 0
18537 
18538 
18539 // Implements typed tests.
18540 
18541 #if GTEST_HAS_TYPED_TEST
18542 
18543 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
18544 //
18545 // Expands to the name of the typedef for the type parameters of the
18546 // given test case.
18547 # define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_
18548 
18549 // The 'Types' template argument below must have spaces around it
18550 // since some compilers may choke on '>>' when passing a template
18551 // instance (e.g. Types<int>)
18552 # define TYPED_TEST_CASE(CaseName, Types) \
18553  typedef ::testing::internal::TypeList< Types >::type \
18554  GTEST_TYPE_PARAMS_(CaseName)
18555 
18556 # define TYPED_TEST(CaseName, TestName) \
18557  template <typename gtest_TypeParam_> \
18558  class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \
18559  : public CaseName<gtest_TypeParam_> { \
18560  private: \
18561  typedef CaseName<gtest_TypeParam_> TestFixture; \
18562  typedef gtest_TypeParam_ TypeParam; \
18563  virtual void TestBody(); \
18564  }; \
18565  bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \
18566  ::testing::internal::TypeParameterizedTest< \
18567  CaseName, \
18568  ::testing::internal::TemplateSel< \
18569  GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \
18570  GTEST_TYPE_PARAMS_(CaseName)>::Register(\
18571  "", #CaseName, #TestName, 0); \
18572  template <typename gtest_TypeParam_> \
18573  void GTEST_TEST_CLASS_NAME_(CaseName, TestName)<gtest_TypeParam_>::TestBody()
18574 
18575 #endif // GTEST_HAS_TYPED_TEST
18576 
18577 // Implements type-parameterized tests.
18578 
18579 #if GTEST_HAS_TYPED_TEST_P
18580 
18581 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
18582 //
18583 // Expands to the namespace name that the type-parameterized tests for
18584 // the given type-parameterized test case are defined in. The exact
18585 // name of the namespace is subject to change without notice.
18586 # define GTEST_CASE_NAMESPACE_(TestCaseName) \
18587  gtest_case_##TestCaseName##_
18588 
18589 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
18590 //
18591 // Expands to the name of the variable used to remember the names of
18592 // the defined tests in the given test case.
18593 # define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \
18594  gtest_typed_test_case_p_state_##TestCaseName##_
18595 
18596 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY.
18597 //
18598 // Expands to the name of the variable used to remember the names of
18599 // the registered tests in the given test case.
18600 # define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \
18601  gtest_registered_test_names_##TestCaseName##_
18602 
18603 // The variables defined in the type-parameterized test macros are
18604 // static as typically these macros are used in a .h file that can be
18605 // #included in multiple translation units linked together.
18606 # define TYPED_TEST_CASE_P(CaseName) \
18607  static ::testing::internal::TypedTestCasePState \
18608  GTEST_TYPED_TEST_CASE_P_STATE_(CaseName)
18609 
18610 # define TYPED_TEST_P(CaseName, TestName) \
18611  namespace GTEST_CASE_NAMESPACE_(CaseName) { \
18612  template <typename gtest_TypeParam_> \
18613  class TestName : public CaseName<gtest_TypeParam_> { \
18614  private: \
18615  typedef CaseName<gtest_TypeParam_> TestFixture; \
18616  typedef gtest_TypeParam_ TypeParam; \
18617  virtual void TestBody(); \
18618  }; \
18619  static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \
18620  GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\
18621  __FILE__, __LINE__, #CaseName, #TestName); \
18622  } \
18623  template <typename gtest_TypeParam_> \
18624  void GTEST_CASE_NAMESPACE_(CaseName)::TestName<gtest_TypeParam_>::TestBody()
18625 
18626 # define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \
18627  namespace GTEST_CASE_NAMESPACE_(CaseName) { \
18628  typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \
18629  } \
18630  static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \
18631  GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\
18632  __FILE__, __LINE__, #__VA_ARGS__)
18633 
18634 // The 'Types' template argument below must have spaces around it
18635 // since some compilers may choke on '>>' when passing a template
18636 // instance (e.g. Types<int>)
18637 # define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \
18638  bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \
18639  ::testing::internal::TypeParameterizedTestCase<CaseName, \
18640  GTEST_CASE_NAMESPACE_(CaseName)::gtest_AllTests_, \
18641  ::testing::internal::TypeList< Types >::type>::Register(\
18642  #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName))
18643 
18644 #endif // GTEST_HAS_TYPED_TEST_P
18645 
18646 #endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
18647 
18648 // Depending on the platform, different string classes are available.
18649 // On Linux, in addition to ::std::string, Google also makes use of
18650 // class ::string, which has the same interface as ::std::string, but
18651 // has a different implementation.
18652 //
18653 // The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that
18654 // ::string is available AND is a distinct type to ::std::string, or
18655 // define it to 0 to indicate otherwise.
18656 //
18657 // If the user's ::std::string and ::string are the same class due to
18658 // aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0.
18659 //
18660 // If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined
18661 // heuristically.
18662 
18663 namespace testing
18664 {
18665 
18666 // Declares the flags.
18667 
18668 // This flag temporary enables the disabled tests.
18669 GTEST_DECLARE_bool_(also_run_disabled_tests);
18670 
18671 // This flag brings the debugger on an assertion failure.
18672 GTEST_DECLARE_bool_(break_on_failure);
18673 
18674 // This flag controls whether Google Test catches all test-thrown exceptions
18675 // and logs them as failures.
18676 GTEST_DECLARE_bool_(catch_exceptions);
18677 
18678 // This flag enables using colors in terminal output. Available values are
18679 // "yes" to enable colors, "no" (disable colors), or "auto" (the default)
18680 // to let Google Test decide.
18681 GTEST_DECLARE_string_(color);
18682 
18683 // This flag sets up the filter to select by name using a glob pattern
18684 // the tests to run. If the filter is not given all tests are executed.
18685 GTEST_DECLARE_string_(filter);
18686 
18687 // This flag causes the Google Test to list tests. None of the tests listed
18688 // are actually run if the flag is provided.
18689 GTEST_DECLARE_bool_(list_tests);
18690 
18691 // This flag controls whether Google Test emits a detailed XML report to a file
18692 // in addition to its normal textual output.
18694 
18695 // This flags control whether Google Test prints the elapsed time for each
18696 // test.
18697 GTEST_DECLARE_bool_(print_time);
18698 
18699 // This flag specifies the random number seed.
18700 GTEST_DECLARE_int32_(random_seed);
18701 
18702 // This flag sets how many times the tests are repeated. The default value
18703 // is 1. If the value is -1 the tests are repeating forever.
18704 GTEST_DECLARE_int32_(repeat);
18705 
18706 // This flag controls whether Google Test includes Google Test internal
18707 // stack frames in failure stack traces.
18708 GTEST_DECLARE_bool_(show_internal_stack_frames);
18709 
18710 // When this flag is specified, tests' order is randomized on every iteration.
18711 GTEST_DECLARE_bool_(shuffle);
18712 
18713 // This flag specifies the maximum number of stack frames to be
18714 // printed in a failure message.
18715 GTEST_DECLARE_int32_(stack_trace_depth);
18716 
18717 // When this flag is specified, a failed assertion will throw an
18718 // exception if exceptions are enabled, or exit the program with a
18719 // non-zero code otherwise.
18720 GTEST_DECLARE_bool_(throw_on_failure);
18721 
18722 // When this flag is set with a "host:port" string, on supported
18723 // platforms test results are streamed to the specified port on
18724 // the specified host machine.
18725 GTEST_DECLARE_string_(stream_result_to);
18726 
18727 // The upper limit for valid stack trace depths.
18728 const int kMaxStackTraceDepth = 100;
18729 
18730 namespace internal
18731 {
18732 
18733 class AssertHelper;
18734 class DefaultGlobalTestPartResultReporter;
18735 class ExecDeathTest;
18736 class NoExecDeathTest;
18737 class FinalSuccessChecker;
18738 class GTestFlagSaver;
18739 class StreamingListenerTest;
18740 class TestResultAccessor;
18741 class TestEventListenersAccessor;
18742 class TestEventRepeater;
18743 class UnitTestRecordPropertyTestHelper;
18744 class WindowsDeathTest;
18745 class UnitTestImpl * GetUnitTestImpl();
18746 void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
18747  const std::string & message);
18748 
18749 } // namespace internal
18750 
18751 // The friend relationship of some of these classes is cyclic.
18752 // If we don't forward declare them the compiler might confuse the classes
18753 // in friendship clauses with same named classes on the scope.
18754 class Test;
18755 class TestCase;
18756 class TestInfo;
18757 class UnitTest;
18758 
18759 // A class for indicating whether an assertion was successful. When
18760 // the assertion wasn't successful, the AssertionResult object
18761 // remembers a non-empty message that describes how it failed.
18762 //
18763 // To create an instance of this class, use one of the factory functions
18764 // (AssertionSuccess() and AssertionFailure()).
18765 //
18766 // This class is useful for two purposes:
18767 // 1. Defining predicate functions to be used with Boolean test assertions
18768 // EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts
18769 // 2. Defining predicate-format functions to be
18770 // used with predicate assertions (ASSERT_PRED_FORMAT*, etc).
18771 //
18772 // For example, if you define IsEven predicate:
18773 //
18774 // testing::AssertionResult IsEven(int n) {
18775 // if ((n % 2) == 0)
18776 // return testing::AssertionSuccess();
18777 // else
18778 // return testing::AssertionFailure() << n << " is odd";
18779 // }
18780 //
18781 // Then the failed expectation EXPECT_TRUE(IsEven(Fib(5)))
18782 // will print the message
18783 //
18784 // Value of: IsEven(Fib(5))
18785 // Actual: false (5 is odd)
18786 // Expected: true
18787 //
18788 // instead of a more opaque
18789 //
18790 // Value of: IsEven(Fib(5))
18791 // Actual: false
18792 // Expected: true
18793 //
18794 // in case IsEven is a simple Boolean predicate.
18795 //
18796 // If you expect your predicate to be reused and want to support informative
18797 // messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up
18798 // about half as often as positive ones in our tests), supply messages for
18799 // both success and failure cases:
18800 //
18801 // testing::AssertionResult IsEven(int n) {
18802 // if ((n % 2) == 0)
18803 // return testing::AssertionSuccess() << n << " is even";
18804 // else
18805 // return testing::AssertionFailure() << n << " is odd";
18806 // }
18807 //
18808 // Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print
18809 //
18810 // Value of: IsEven(Fib(6))
18811 // Actual: true (8 is even)
18812 // Expected: false
18813 //
18814 // NB: Predicates that support negative Boolean assertions have reduced
18815 // performance in positive ones so be careful not to use them in tests
18816 // that have lots (tens of thousands) of positive Boolean assertions.
18817 //
18818 // To use this class with EXPECT_PRED_FORMAT assertions such as:
18819 //
18820 // // Verifies that Foo() returns an even number.
18821 // EXPECT_PRED_FORMAT1(IsEven, Foo());
18822 //
18823 // you need to define:
18824 //
18825 // testing::AssertionResult IsEven(const char* expr, int n) {
18826 // if ((n % 2) == 0)
18827 // return testing::AssertionSuccess();
18828 // else
18829 // return testing::AssertionFailure()
18830 // << "Expected: " << expr << " is even\n Actual: it's " << n;
18831 // }
18832 //
18833 // If Foo() returns 5, you will see the following message:
18834 //
18835 // Expected: Foo() is even
18836 // Actual: it's 5
18837 //
18838 class GTEST_API_ AssertionResult
18839 {
18840 public:
18841  // Copy constructor.
18842  // Used in EXPECT_TRUE/FALSE(assertion_result).
18843  AssertionResult(const AssertionResult & other);
18844  // Used in the EXPECT_TRUE/FALSE(bool_expression).
18845  explicit AssertionResult(bool success) : success_(success) {}
18846 
18847  // Returns true iff the assertion succeeded.
18848  operator bool() const { return success_; } // NOLINT
18849 
18850  // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
18851  AssertionResult operator!() const;
18852 
18853  // Returns the text streamed into this AssertionResult. Test assertions
18854  // use it when they fail (i.e., the predicate's outcome doesn't match the
18855  // assertion's expectation). When nothing has been streamed into the
18856  // object, returns an empty string.
18857  const char * message() const
18858  {
18859  return message_.get() != NULL ? message_->c_str() : "";
18860  }
18861  // TODO(vladl@google.com): Remove this after making sure no clients use it.
18862  // Deprecated; please use message() instead.
18863  const char * failure_message() const { return message(); }
18864 
18865  // Streams a custom failure message into this object.
18866  template <typename T> AssertionResult & operator<<(const T & value)
18867  {
18868  AppendMessage(Message() << value);
18869  return *this;
18870  }
18871 
18872  // Allows streaming basic output manipulators such as endl or flush into
18873  // this object.
18874  AssertionResult & operator<<(
18875  ::std::ostream & (*basic_manipulator)(::std::ostream & stream))
18876  {
18877  AppendMessage(Message() << basic_manipulator);
18878  return *this;
18879  }
18880 
18881 private:
18882  // Appends the contents of message to message_.
18883  void AppendMessage(const Message & a_message)
18884  {
18885  if (message_.get() == NULL)
18886  { message_.reset(new ::std::string); }
18887 
18888  message_->append(a_message.GetString().c_str());
18889  }
18890 
18891  // Stores result of the assertion predicate.
18892  bool success_;
18893  // Stores the message describing the condition in case the expectation
18894  // construct is not satisfied with the predicate's outcome.
18895  // Referenced via a pointer to avoid taking too much stack frame space
18896  // with test assertions.
18898 
18899  GTEST_DISALLOW_ASSIGN_(AssertionResult);
18900 };
18901 
18902 // Makes a successful assertion result.
18903 GTEST_API_ AssertionResult AssertionSuccess();
18904 
18905 // Makes a failed assertion result.
18906 GTEST_API_ AssertionResult AssertionFailure();
18907 
18908 // Makes a failed assertion result with the given failure message.
18909 // Deprecated; use AssertionFailure() << msg.
18910 GTEST_API_ AssertionResult AssertionFailure(const Message & msg);
18911 
18912 // The abstract class that all tests inherit from.
18913 //
18914 // In Google Test, a unit test program contains one or many TestCases, and
18915 // each TestCase contains one or many Tests.
18916 //
18917 // When you define a test using the TEST macro, you don't need to
18918 // explicitly derive from Test - the TEST macro automatically does
18919 // this for you.
18920 //
18921 // The only time you derive from Test is when defining a test fixture
18922 // to be used a TEST_F. For example:
18923 //
18924 // class FooTest : public testing::Test {
18925 // protected:
18926 // virtual void SetUp() { ... }
18927 // virtual void TearDown() { ... }
18928 // ...
18929 // };
18930 //
18931 // TEST_F(FooTest, Bar) { ... }
18932 // TEST_F(FooTest, Baz) { ... }
18933 //
18934 // Test is not copyable.
18935 class GTEST_API_ Test
18936 {
18937 public:
18938  friend class TestInfo;
18939 
18940  // Defines types for pointers to functions that set up and tear down
18941  // a test case.
18944 
18945  // The d'tor is virtual as we intend to inherit from Test.
18946  virtual ~Test();
18947 
18948  // Sets up the stuff shared by all tests in this test case.
18949  //
18950  // Google Test will call Foo::SetUpTestCase() before running the first
18951  // test in test case Foo. Hence a sub-class can define its own
18952  // SetUpTestCase() method to shadow the one defined in the super
18953  // class.
18954  static void SetUpTestCase() {}
18955 
18956  // Tears down the stuff shared by all tests in this test case.
18957  //
18958  // Google Test will call Foo::TearDownTestCase() after running the last
18959  // test in test case Foo. Hence a sub-class can define its own
18960  // TearDownTestCase() method to shadow the one defined in the super
18961  // class.
18962  static void TearDownTestCase() {}
18963 
18964  // Returns true iff the current test has a fatal failure.
18965  static bool HasFatalFailure();
18966 
18967  // Returns true iff the current test has a non-fatal failure.
18968  static bool HasNonfatalFailure();
18969 
18970  // Returns true iff the current test has a (either fatal or
18971  // non-fatal) failure.
18972  static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }
18973 
18974  // Logs a property for the current test, test case, or for the entire
18975  // invocation of the test program when used outside of the context of a
18976  // test case. Only the last value for a given key is remembered. These
18977  // are public static so they can be called from utility functions that are
18978  // not members of the test fixture. Calls to RecordProperty made during
18979  // lifespan of the test (from the moment its constructor starts to the
18980  // moment its destructor finishes) will be output in XML as attributes of
18981  // the <testcase> element. Properties recorded from fixture's
18982  // SetUpTestCase or TearDownTestCase are logged as attributes of the
18983  // corresponding <testsuite> element. Calls to RecordProperty made in the
18984  // global context (before or after invocation of RUN_ALL_TESTS and from
18985  // SetUp/TearDown method of Environment objects registered with Google
18986  // Test) will be output as attributes of the <testsuites> element.
18987  static void RecordProperty(const std::string & key, const std::string & value);
18988  static void RecordProperty(const std::string & key, int value);
18989 
18990 protected:
18991  // Creates a Test object.
18992  Test();
18993 
18994  // Sets up the test fixture.
18995  virtual void SetUp();
18996 
18997  // Tears down the test fixture.
18998  virtual void TearDown();
18999 
19000 private:
19001  // Returns true iff the current test has the same fixture class as
19002  // the first test in the current test case.
19003  static bool HasSameFixtureClass();
19004 
19005  // Runs the test after the test fixture has been set up.
19006  //
19007  // A sub-class must implement this to define the test logic.
19008  //
19009  // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM.
19010  // Instead, use the TEST or TEST_F macro.
19011  virtual void TestBody() = 0;
19012 
19013  // Sets up, executes, and tears down the test.
19014  void Run();
19015 
19016  // Deletes self. We deliberately pick an unusual name for this
19017  // internal method to avoid clashing with names used in user TESTs.
19018  void DeleteSelf_() { delete this; }
19019 
19020  // Uses a GTestFlagSaver to save and restore all Google Test flags.
19021  const internal::GTestFlagSaver * const gtest_flag_saver_;
19022 
19023  // Often a user mis-spells SetUp() as Setup() and spends a long time
19024  // wondering why it is never called by Google Test. The declaration of
19025  // the following method is solely for catching such an error at
19026  // compile time:
19027  //
19028  // - The return type is deliberately chosen to be not void, so it
19029  // will be a conflict if a user declares void Setup() in his test
19030  // fixture.
19031  //
19032  // - This method is private, so it will be another compiler error
19033  // if a user calls it from his test fixture.
19034  //
19035  // DO NOT OVERRIDE THIS FUNCTION.
19036  //
19037  // If you see an error about overriding the following function or
19038  // about it being private, you have mis-spelled SetUp() as Setup().
19040  virtual Setup_should_be_spelled_SetUp * Setup() { return NULL; }
19041 
19042  // We disallow copying Tests.
19044 };
19045 
19047 
19048 // A copyable object representing a user specified test property which can be
19049 // output as a key/value string pair.
19050 //
19051 // Don't inherit from TestProperty as its destructor is not virtual.
19052 class TestProperty
19053 {
19054 public:
19055  // C'tor. TestProperty does NOT have a default constructor.
19056  // Always use this constructor (with parameters) to create a
19057  // TestProperty object.
19058  TestProperty(const std::string & a_key, const std::string & a_value) :
19059  key_(a_key), value_(a_value)
19060  {
19061  }
19062 
19063  // Gets the user supplied key.
19064  const char * key() const
19065  {
19066  return key_.c_str();
19067  }
19068 
19069  // Gets the user supplied value.
19070  const char * value() const
19071  {
19072  return value_.c_str();
19073  }
19074 
19075  // Sets a new value, overriding the one supplied in the constructor.
19076  void SetValue(const std::string & new_value)
19077  {
19078  value_ = new_value;
19079  }
19080 
19081 private:
19082  // The key supplied by the user.
19083  std::string key_;
19084  // The value supplied by the user.
19085  std::string value_;
19086 };
19087 
19088 // The result of a single Test. This includes a list of
19089 // TestPartResults, a list of TestProperties, a count of how many
19090 // death tests there are in the Test, and how much time it took to run
19091 // the Test.
19092 //
19093 // TestResult is not copyable.
19094 class GTEST_API_ TestResult
19095 {
19096 public:
19097  // Creates an empty TestResult.
19098  TestResult();
19099 
19100  // D'tor. Do not inherit from TestResult.
19101  ~TestResult();
19102 
19103  // Gets the number of all test parts. This is the sum of the number
19104  // of successful test parts and the number of failed test parts.
19105  int total_part_count() const;
19106 
19107  // Returns the number of the test properties.
19108  int test_property_count() const;
19109 
19110  // Returns true iff the test passed (i.e. no test part failed).
19111  bool Passed() const { return !Failed(); }
19112 
19113  // Returns true iff the test failed.
19114  bool Failed() const;
19115 
19116  // Returns true iff the test fatally failed.
19117  bool HasFatalFailure() const;
19118 
19119  // Returns true iff the test has a non-fatal failure.
19120  bool HasNonfatalFailure() const;
19121 
19122  // Returns the elapsed time, in milliseconds.
19123  TimeInMillis elapsed_time() const { return elapsed_time_; }
19124 
19125  // Returns the i-th test part result among all the results. i can range
19126  // from 0 to test_property_count() - 1. If i is not in that range, aborts
19127  // the program.
19128  const TestPartResult & GetTestPartResult(int i) const;
19129 
19130  // Returns the i-th test property. i can range from 0 to
19131  // test_property_count() - 1. If i is not in that range, aborts the
19132  // program.
19133  const TestProperty & GetTestProperty(int i) const;
19134 
19135 private:
19136  friend class TestInfo;
19137  friend class TestCase;
19138  friend class UnitTest;
19140  friend class internal::ExecDeathTest;
19141  friend class internal::TestResultAccessor;
19142  friend class internal::UnitTestImpl;
19143  friend class internal::WindowsDeathTest;
19144 
19145  // Gets the vector of TestPartResults.
19146  const std::vector<TestPartResult> & test_part_results() const
19147  {
19148  return test_part_results_;
19149  }
19150 
19151  // Gets the vector of TestProperties.
19152  const std::vector<TestProperty> & test_properties() const
19153  {
19154  return test_properties_;
19155  }
19156 
19157  // Sets the elapsed time.
19158  void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }
19159 
19160  // Adds a test property to the list. The property is validated and may add
19161  // a non-fatal failure if invalid (e.g., if it conflicts with reserved
19162  // key names). If a property is already recorded for the same key, the
19163  // value will be updated, rather than storing multiple values for the same
19164  // key. xml_element specifies the element for which the property is being
19165  // recorded and is used for validation.
19166  void RecordProperty(const std::string & xml_element,
19167  const TestProperty & test_property);
19168 
19169  // Adds a failure if the key is a reserved attribute of Google Test
19170  // testcase tags. Returns true if the property is valid.
19171  // TODO(russr): Validate attribute names are legal and human readable.
19172  static bool ValidateTestProperty(const std::string & xml_element,
19173  const TestProperty & test_property);
19174 
19175  // Adds a test part result to the list.
19176  void AddTestPartResult(const TestPartResult & test_part_result);
19177 
19178  // Returns the death test count.
19179  int death_test_count() const { return death_test_count_; }
19180 
19181  // Increments the death test count, returning the new count.
19182  int increment_death_test_count() { return ++death_test_count_; }
19183 
19184  // Clears the test part results.
19185  void ClearTestPartResults();
19186 
19187  // Clears the object.
19188  void Clear();
19189 
19190  // Protects mutable state of the property vector and of owned
19191  // properties, whose values may be updated.
19192  internal::Mutex test_properites_mutex_;
19193 
19194  // The vector of TestPartResults
19195  std::vector<TestPartResult> test_part_results_;
19196  // The vector of TestProperties
19197  std::vector<TestProperty> test_properties_;
19198  // Running count of death tests.
19199  int death_test_count_;
19200  // The elapsed time, in milliseconds.
19201  TimeInMillis elapsed_time_;
19202 
19203  // We disallow copying TestResult.
19204  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult);
19205 }; // class TestResult
19206 
19207 // A TestInfo object stores the following information about a test:
19208 //
19209 // Test case name
19210 // Test name
19211 // Whether the test should be run
19212 // A function pointer that creates the test object when invoked
19213 // Test result
19214 //
19215 // The constructor of TestInfo registers itself with the UnitTest
19216 // singleton such that the RUN_ALL_TESTS() macro knows which tests to
19217 // run.
19218 class GTEST_API_ TestInfo
19219 {
19220 public:
19221  // Destructs a TestInfo object. This function is not virtual, so
19222  // don't inherit from TestInfo.
19223  ~TestInfo();
19224 
19225  // Returns the test case name.
19226  const char * test_case_name() const { return test_case_name_.c_str(); }
19227 
19228  // Returns the test name.
19229  const char * name() const { return name_.c_str(); }
19230 
19231  // Returns the name of the parameter type, or NULL if this is not a typed
19232  // or a type-parameterized test.
19233  const char * type_param() const
19234  {
19235  if (type_param_.get() != NULL)
19236  { return type_param_->c_str(); }
19237 
19238  return NULL;
19239  }
19240 
19241  // Returns the text representation of the value parameter, or NULL if this
19242  // is not a value-parameterized test.
19243  const char * value_param() const
19244  {
19245  if (value_param_.get() != NULL)
19246  { return value_param_->c_str(); }
19247 
19248  return NULL;
19249  }
19250 
19251  // Returns true if this test should run, that is if the test is not
19252  // disabled (or it is disabled but the also_run_disabled_tests flag has
19253  // been specified) and its full name matches the user-specified filter.
19254  //
19255  // Google Test allows the user to filter the tests by their full names.
19256  // The full name of a test Bar in test case Foo is defined as
19257  // "Foo.Bar". Only the tests that match the filter will run.
19258  //
19259  // A filter is a colon-separated list of glob (not regex) patterns,
19260  // optionally followed by a '-' and a colon-separated list of
19261  // negative patterns (tests to exclude). A test is run if it
19262  // matches one of the positive patterns and does not match any of
19263  // the negative patterns.
19264  //
19265  // For example, *A*:Foo.* is a filter that matches any string that
19266  // contains the character 'A' or starts with "Foo.".
19267  bool should_run() const { return should_run_; }
19268 
19269  // Returns true iff this test will appear in the XML report.
19270  bool is_reportable() const
19271  {
19272  // For now, the XML report includes all tests matching the filter.
19273  // In the future, we may trim tests that are excluded because of
19274  // sharding.
19275  return matches_filter_;
19276  }
19277 
19278  // Returns the result of the test.
19279  const TestResult * result() const { return &result_; }
19280 
19281 private:
19282 #if GTEST_HAS_DEATH_TEST
19283  friend class internal::DefaultDeathTestFactory;
19284 #endif // GTEST_HAS_DEATH_TEST
19285  friend class Test;
19286  friend class TestCase;
19287  friend class internal::UnitTestImpl;
19288  friend class internal::StreamingListenerTest;
19289  friend TestInfo * internal::MakeAndRegisterTestInfo(
19290  const char * test_case_name,
19291  const char * name,
19292  const char * type_param,
19293  const char * value_param,
19294  internal::TypeId fixture_class_id,
19295  Test::SetUpTestCaseFunc set_up_tc,
19296  Test::TearDownTestCaseFunc tear_down_tc,
19297  internal::TestFactoryBase * factory);
19298 
19299  // Constructs a TestInfo object. The newly constructed instance assumes
19300  // ownership of the factory object.
19301  TestInfo(const std::string & test_case_name,
19302  const std::string & name,
19303  const char * a_type_param, // NULL if not a type-parameterized test
19304  const char * a_value_param, // NULL if not a value-parameterized test
19305  internal::TypeId fixture_class_id,
19306  internal::TestFactoryBase * factory);
19307 
19308  // Increments the number of death tests encountered in this test so
19309  // far.
19311  {
19312  return result_.increment_death_test_count();
19313  }
19314 
19315  // Creates the test object, runs it, records its result, and then
19316  // deletes it.
19317  void Run();
19318 
19319  static void ClearTestResult(TestInfo * test_info)
19320  {
19321  test_info->result_.Clear();
19322  }
19323 
19324  // These fields are immutable properties of the test.
19325  const std::string test_case_name_; // Test case name
19326  const std::string name_; // Test name
19327  // Name of the parameter type, or NULL if this is not a typed or a
19328  // type-parameterized test.
19330  // Text representation of the value parameter, or NULL if this is not a
19331  // value-parameterized test.
19332  const internal::scoped_ptr<const ::std::string> value_param_;
19333  const internal::TypeId fixture_class_id_; // ID of the test fixture class
19334  bool should_run_; // True iff this test should run
19335  bool is_disabled_; // True iff this test is disabled
19336  bool matches_filter_; // True if this test matches the
19337  // user-specified filter.
19338  internal::TestFactoryBase * const factory_; // The factory that creates
19339  // the test object
19340 
19341  // This field is mutable and needs to be reset before running the
19342  // test for the second time.
19343  TestResult result_;
19344 
19346 };
19347 
19348 // A test case, which consists of a vector of TestInfos.
19349 //
19350 // TestCase is not copyable.
19351 class GTEST_API_ TestCase
19352 {
19353 public:
19354  // Creates a TestCase with the given name.
19355  //
19356  // TestCase does NOT have a default constructor. Always use this
19357  // constructor to create a TestCase object.
19358  //
19359  // Arguments:
19360  //
19361  // name: name of the test case
19362  // a_type_param: the name of the test's type parameter, or NULL if
19363  // this is not a type-parameterized test.
19364  // set_up_tc: pointer to the function that sets up the test case
19365  // tear_down_tc: pointer to the function that tears down the test case
19366  TestCase(const char * name, const char * a_type_param,
19367  Test::SetUpTestCaseFunc set_up_tc,
19368  Test::TearDownTestCaseFunc tear_down_tc);
19369 
19370  // Destructor of TestCase.
19371  virtual ~TestCase();
19372 
19373  // Gets the name of the TestCase.
19374  const char * name() const { return name_.c_str(); }
19375 
19376  // Returns the name of the parameter type, or NULL if this is not a
19377  // type-parameterized test case.
19378  const char * type_param() const
19379  {
19380  if (type_param_.get() != NULL)
19381  { return type_param_->c_str(); }
19382 
19383  return NULL;
19384  }
19385 
19386  // Returns true if any test in this test case should run.
19387  bool should_run() const { return should_run_; }
19388 
19389  // Gets the number of successful tests in this test case.
19390  int successful_test_count() const;
19391 
19392  // Gets the number of failed tests in this test case.
19393  int failed_test_count() const;
19394 
19395  // Gets the number of disabled tests that will be reported in the XML report.
19396  int reportable_disabled_test_count() const;
19397 
19398  // Gets the number of disabled tests in this test case.
19399  int disabled_test_count() const;
19400 
19401  // Gets the number of tests to be printed in the XML report.
19402  int reportable_test_count() const;
19403 
19404  // Get the number of tests in this test case that should run.
19405  int test_to_run_count() const;
19406 
19407  // Gets the number of all tests in this test case.
19408  int total_test_count() const;
19409 
19410  // Returns true iff the test case passed.
19411  bool Passed() const { return !Failed(); }
19412 
19413  // Returns true iff the test case failed.
19414  bool Failed() const { return failed_test_count() > 0; }
19415 
19416  // Returns the elapsed time, in milliseconds.
19417  TimeInMillis elapsed_time() const { return elapsed_time_; }
19418 
19419  // Returns the i-th test among all the tests. i can range from 0 to
19420  // total_test_count() - 1. If i is not in that range, returns NULL.
19421  const TestInfo * GetTestInfo(int i) const;
19422 
19423  // Returns the TestResult that holds test properties recorded during
19424  // execution of SetUpTestCase and TearDownTestCase.
19425  const TestResult & ad_hoc_test_result() const { return ad_hoc_test_result_; }
19426 
19427 private:
19428  friend class Test;
19429  friend class internal::UnitTestImpl;
19430 
19431  // Gets the (mutable) vector of TestInfos in this TestCase.
19432  std::vector<TestInfo *> & test_info_list() { return test_info_list_; }
19433 
19434  // Gets the (immutable) vector of TestInfos in this TestCase.
19435  const std::vector<TestInfo *> & test_info_list() const
19436  {
19437  return test_info_list_;
19438  }
19439 
19440  // Returns the i-th test among all the tests. i can range from 0 to
19441  // total_test_count() - 1. If i is not in that range, returns NULL.
19442  TestInfo * GetMutableTestInfo(int i);
19443 
19444  // Sets the should_run member.
19445  void set_should_run(bool should) { should_run_ = should; }
19446 
19447  // Adds a TestInfo to this test case. Will delete the TestInfo upon
19448  // destruction of the TestCase object.
19449  void AddTestInfo(TestInfo * test_info);
19450 
19451  // Clears the results of all tests in this test case.
19452  void ClearResult();
19453 
19454  // Clears the results of all tests in the given test case.
19455  static void ClearTestCaseResult(TestCase * test_case)
19456  {
19457  test_case->ClearResult();
19458  }
19459 
19460  // Runs every test in this TestCase.
19461  void Run();
19462 
19463  // Runs SetUpTestCase() for this TestCase. This wrapper is needed
19464  // for catching exceptions thrown from SetUpTestCase().
19465  void RunSetUpTestCase() { (*set_up_tc_)(); }
19466 
19467  // Runs TearDownTestCase() for this TestCase. This wrapper is
19468  // needed for catching exceptions thrown from TearDownTestCase().
19469  void RunTearDownTestCase() { (*tear_down_tc_)(); }
19470 
19471  // Returns true iff test passed.
19472  static bool TestPassed(const TestInfo * test_info)
19473  {
19474  return test_info->should_run() && test_info->result()->Passed();
19475  }
19476 
19477  // Returns true iff test failed.
19478  static bool TestFailed(const TestInfo * test_info)
19479  {
19480  return test_info->should_run() && test_info->result()->Failed();
19481  }
19482 
19483  // Returns true iff the test is disabled and will be reported in the XML
19484  // report.
19485  static bool TestReportableDisabled(const TestInfo * test_info)
19486  {
19487  return test_info->is_reportable() && test_info->is_disabled_;
19488  }
19489 
19490  // Returns true iff test is disabled.
19491  static bool TestDisabled(const TestInfo * test_info)
19492  {
19493  return test_info->is_disabled_;
19494  }
19495 
19496  // Returns true iff this test will appear in the XML report.
19497  static bool TestReportable(const TestInfo * test_info)
19498  {
19499  return test_info->is_reportable();
19500  }
19501 
19502  // Returns true if the given test should run.
19503  static bool ShouldRunTest(const TestInfo * test_info)
19504  {
19505  return test_info->should_run();
19506  }
19507 
19508  // Shuffles the tests in this test case.
19509  void ShuffleTests(internal::Random * random);
19510 
19511  // Restores the test order to before the first shuffle.
19512  void UnshuffleTests();
19513 
19514  // Name of the test case.
19516  // Name of the parameter type, or NULL if this is not a typed or a
19517  // type-parameterized test.
19519  // The vector of TestInfos in their original order. It owns the
19520  // elements in the vector.
19521  std::vector<TestInfo *> test_info_list_;
19522  // Provides a level of indirection for the test list to allow easy
19523  // shuffling and restoring the test order. The i-th element in this
19524  // vector is the index of the i-th test in the shuffled test list.
19525  std::vector<int> test_indices_;
19526  // Pointer to the function that sets up the test case.
19527  Test::SetUpTestCaseFunc set_up_tc_;
19528  // Pointer to the function that tears down the test case.
19529  Test::TearDownTestCaseFunc tear_down_tc_;
19530  // True iff any test in this test case should run.
19531  bool should_run_;
19532  // Elapsed time, in milliseconds.
19533  TimeInMillis elapsed_time_;
19534  // Holds test properties recorded during execution of SetUpTestCase and
19535  // TearDownTestCase.
19536  TestResult ad_hoc_test_result_;
19537 
19538  // We disallow copying TestCases.
19540 };
19541 
19542 // An Environment object is capable of setting up and tearing down an
19543 // environment. The user should subclass this to define his own
19544 // environment(s).
19545 //
19546 // An Environment object does the set-up and tear-down in virtual
19547 // methods SetUp() and TearDown() instead of the constructor and the
19548 // destructor, as:
19549 //
19550 // 1. You cannot safely throw from a destructor. This is a problem
19551 // as in some cases Google Test is used where exceptions are enabled, and
19552 // we may want to implement ASSERT_* using exceptions where they are
19553 // available.
19554 // 2. You cannot use ASSERT_* directly in a constructor or
19555 // destructor.
19556 class Environment
19557 {
19558 public:
19559  // The d'tor is virtual as we need to subclass Environment.
19560  virtual ~Environment() {}
19561 
19562  // Override this to define how to set up the environment.
19563  virtual void SetUp() {}
19564 
19565  // Override this to define how to tear down the environment.
19566  virtual void TearDown() {}
19567 private:
19568  // If you see an error about overriding the following function or
19569  // about it being private, you have mis-spelled SetUp() as Setup().
19571  virtual Setup_should_be_spelled_SetUp * Setup() { return NULL; }
19572 };
19573 
19574 // The interface for tracing execution of tests. The methods are organized in
19575 // the order the corresponding events are fired.
19576 class TestEventListener
19577 {
19578 public:
19579  virtual ~TestEventListener() {}
19580 
19581  // Fired before any test activity starts.
19582  virtual void OnTestProgramStart(const UnitTest & unit_test) = 0;
19583 
19584  // Fired before each iteration of tests starts. There may be more than
19585  // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration
19586  // index, starting from 0.
19587  virtual void OnTestIterationStart(const UnitTest & unit_test,
19588  int iteration) = 0;
19589 
19590  // Fired before environment set-up for each iteration of tests starts.
19591  virtual void OnEnvironmentsSetUpStart(const UnitTest & unit_test) = 0;
19592 
19593  // Fired after environment set-up for each iteration of tests ends.
19594  virtual void OnEnvironmentsSetUpEnd(const UnitTest & unit_test) = 0;
19595 
19596  // Fired before the test case starts.
19597  virtual void OnTestCaseStart(const TestCase & test_case) = 0;
19598 
19599  // Fired before the test starts.
19600  virtual void OnTestStart(const TestInfo & test_info) = 0;
19601 
19602  // Fired after a failed assertion or a SUCCEED() invocation.
19603  virtual void OnTestPartResult(const TestPartResult & test_part_result) = 0;
19604 
19605  // Fired after the test ends.
19606  virtual void OnTestEnd(const TestInfo & test_info) = 0;
19607 
19608  // Fired after the test case ends.
19609  virtual void OnTestCaseEnd(const TestCase & test_case) = 0;
19610 
19611  // Fired before environment tear-down for each iteration of tests starts.
19612  virtual void OnEnvironmentsTearDownStart(const UnitTest & unit_test) = 0;
19613 
19614  // Fired after environment tear-down for each iteration of tests ends.
19615  virtual void OnEnvironmentsTearDownEnd(const UnitTest & unit_test) = 0;
19616 
19617  // Fired after each iteration of tests finishes.
19618  virtual void OnTestIterationEnd(const UnitTest & unit_test,
19619  int iteration) = 0;
19620 
19621  // Fired after all test activities have ended.
19622  virtual void OnTestProgramEnd(const UnitTest & unit_test) = 0;
19623 };
19624 
19625 // The convenience class for users who need to override just one or two
19626 // methods and are not concerned that a possible change to a signature of
19627 // the methods they override will not be caught during the build. For
19628 // comments about each method please see the definition of TestEventListener
19629 // above.
19631 {
19632 public:
19633  virtual void OnTestProgramStart(const UnitTest & /*unit_test*/) {}
19634  virtual void OnTestIterationStart(const UnitTest & /*unit_test*/,
19635  int /*iteration*/) {}
19636  virtual void OnEnvironmentsSetUpStart(const UnitTest & /*unit_test*/) {}
19637  virtual void OnEnvironmentsSetUpEnd(const UnitTest & /*unit_test*/) {}
19638  virtual void OnTestCaseStart(const TestCase & /*test_case*/) {}
19639  virtual void OnTestStart(const TestInfo & /*test_info*/) {}
19640  virtual void OnTestPartResult(const TestPartResult & /*test_part_result*/) {}
19641  virtual void OnTestEnd(const TestInfo & /*test_info*/) {}
19642  virtual void OnTestCaseEnd(const TestCase & /*test_case*/) {}
19643  virtual void OnEnvironmentsTearDownStart(const UnitTest & /*unit_test*/) {}
19644  virtual void OnEnvironmentsTearDownEnd(const UnitTest & /*unit_test*/) {}
19645  virtual void OnTestIterationEnd(const UnitTest & /*unit_test*/,
19646  int /*iteration*/) {}
19647  virtual void OnTestProgramEnd(const UnitTest & /*unit_test*/) {}
19648 };
19649 
19650 // TestEventListeners lets users add listeners to track events in Google Test.
19651 class GTEST_API_ TestEventListeners
19652 {
19653 public:
19654  TestEventListeners();
19655  ~TestEventListeners();
19656 
19657  // Appends an event listener to the end of the list. Google Test assumes
19658  // the ownership of the listener (i.e. it will delete the listener when
19659  // the test program finishes).
19660  void Append(TestEventListener * listener);
19661 
19662  // Removes the given event listener from the list and returns it. It then
19663  // becomes the caller's responsibility to delete the listener. Returns
19664  // NULL if the listener is not found in the list.
19665  TestEventListener * Release(TestEventListener * listener);
19666 
19667  // Returns the standard listener responsible for the default console
19668  // output. Can be removed from the listeners list to shut down default
19669  // console output. Note that removing this object from the listener list
19670  // with Release transfers its ownership to the caller and makes this
19671  // function return NULL the next time.
19673  {
19674  return default_result_printer_;
19675  }
19676 
19677  // Returns the standard listener responsible for the default XML output
19678  // controlled by the --gtest_output=xml flag. Can be removed from the
19679  // listeners list by users who want to shut down the default XML output
19680  // controlled by this flag and substitute it with custom one. Note that
19681  // removing this object from the listener list with Release transfers its
19682  // ownership to the caller and makes this function return NULL the next
19683  // time.
19685  {
19686  return default_xml_generator_;
19687  }
19688 
19689 private:
19690  friend class TestCase;
19691  friend class TestInfo;
19693  friend class internal::NoExecDeathTest;
19695  friend class internal::UnitTestImpl;
19696 
19697  // Returns repeater that broadcasts the TestEventListener events to all
19698  // subscribers.
19699  TestEventListener * repeater();
19700 
19701  // Sets the default_result_printer attribute to the provided listener.
19702  // The listener is also added to the listener list and previous
19703  // default_result_printer is removed from it and deleted. The listener can
19704  // also be NULL in which case it will not be added to the list. Does
19705  // nothing if the previous and the current listener objects are the same.
19706  void SetDefaultResultPrinter(TestEventListener * listener);
19707 
19708  // Sets the default_xml_generator attribute to the provided listener. The
19709  // listener is also added to the listener list and previous
19710  // default_xml_generator is removed from it and deleted. The listener can
19711  // also be NULL in which case it will not be added to the list. Does
19712  // nothing if the previous and the current listener objects are the same.
19713  void SetDefaultXmlGenerator(TestEventListener * listener);
19714 
19715  // Controls whether events will be forwarded by the repeater to the
19716  // listeners in the list.
19717  bool EventForwardingEnabled() const;
19718  void SuppressEventForwarding();
19719 
19720  // The actual list of listeners.
19721  internal::TestEventRepeater * repeater_;
19722  // Listener responsible for the standard result output.
19723  TestEventListener * default_result_printer_;
19724  // Listener responsible for the creation of the XML output file.
19725  TestEventListener * default_xml_generator_;
19726 
19727  // We disallow copying TestEventListeners.
19728  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners);
19729 };
19730 
19731 // A UnitTest consists of a vector of TestCases.
19732 //
19733 // This is a singleton class. The only instance of UnitTest is
19734 // created when UnitTest::GetInstance() is first called. This
19735 // instance is never deleted.
19736 //
19737 // UnitTest is not copyable.
19738 //
19739 // This class is thread-safe as long as the methods are called
19740 // according to their specification.
19741 class GTEST_API_ UnitTest
19742 {
19743 public:
19744  // Gets the singleton UnitTest object. The first time this method
19745  // is called, a UnitTest object is constructed and returned.
19746  // Consecutive calls will return the same object.
19747  static UnitTest * GetInstance();
19748 
19749  // Runs all tests in this UnitTest object and prints the result.
19750  // Returns 0 if successful, or 1 otherwise.
19751  //
19752  // This method can only be called from the main thread.
19753  //
19754  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
19756 
19757  // Returns the working directory when the first TEST() or TEST_F()
19758  // was executed. The UnitTest object owns the string.
19759  const char * original_working_dir() const;
19760 
19761  // Returns the TestCase object for the test that's currently running,
19762  // or NULL if no test is running.
19763  const TestCase * current_test_case() const
19764  GTEST_LOCK_EXCLUDED_(mutex_);
19765 
19766  // Returns the TestInfo object for the test that's currently running,
19767  // or NULL if no test is running.
19768  const TestInfo * current_test_info() const
19769  GTEST_LOCK_EXCLUDED_(mutex_);
19770 
19771  // Returns the random seed used at the start of the current test run.
19772  int random_seed() const;
19773 
19774 #if GTEST_HAS_PARAM_TEST
19775  // Returns the ParameterizedTestCaseRegistry object used to keep track of
19776  // value-parameterized tests and instantiate and register them.
19777  //
19778  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
19779  internal::ParameterizedTestCaseRegistry & parameterized_test_registry()
19780  GTEST_LOCK_EXCLUDED_(mutex_);
19781 #endif // GTEST_HAS_PARAM_TEST
19782 
19783  // Gets the number of successful test cases.
19784  int successful_test_case_count() const;
19785 
19786  // Gets the number of failed test cases.
19787  int failed_test_case_count() const;
19788 
19789  // Gets the number of all test cases.
19790  int total_test_case_count() const;
19791 
19792  // Gets the number of all test cases that contain at least one test
19793  // that should run.
19794  int test_case_to_run_count() const;
19795 
19796  // Gets the number of successful tests.
19797  int successful_test_count() const;
19798 
19799  // Gets the number of failed tests.
19800  int failed_test_count() const;
19801 
19802  // Gets the number of disabled tests that will be reported in the XML report.
19803  int reportable_disabled_test_count() const;
19804 
19805  // Gets the number of disabled tests.
19806  int disabled_test_count() const;
19807 
19808  // Gets the number of tests to be printed in the XML report.
19809  int reportable_test_count() const;
19810 
19811  // Gets the number of all tests.
19812  int total_test_count() const;
19813 
19814  // Gets the number of tests that should run.
19815  int test_to_run_count() const;
19816 
19817  // Gets the time of the test program start, in ms from the start of the
19818  // UNIX epoch.
19819  TimeInMillis start_timestamp() const;
19820 
19821  // Gets the elapsed time, in milliseconds.
19822  TimeInMillis elapsed_time() const;
19823 
19824  // Returns true iff the unit test passed (i.e. all test cases passed).
19825  bool Passed() const;
19826 
19827  // Returns true iff the unit test failed (i.e. some test case failed
19828  // or something outside of all tests failed).
19829  bool Failed() const;
19830 
19831  // Gets the i-th test case among all the test cases. i can range from 0 to
19832  // total_test_case_count() - 1. If i is not in that range, returns NULL.
19833  const TestCase * GetTestCase(int i) const;
19834 
19835  // Returns the TestResult containing information on test failures and
19836  // properties logged outside of individual test cases.
19837  const TestResult & ad_hoc_test_result() const;
19838 
19839  // Returns the list of event listeners that can be used to track events
19840  // inside Google Test.
19841  TestEventListeners & listeners();
19842 
19843 private:
19844  // Registers and returns a global test environment. When a test
19845  // program is run, all global test environments will be set-up in
19846  // the order they were registered. After all tests in the program
19847  // have finished, all global test environments will be torn-down in
19848  // the *reverse* order they were registered.
19849  //
19850  // The UnitTest object takes ownership of the given environment.
19851  //
19852  // This method can only be called from the main thread.
19853  Environment * AddEnvironment(Environment * env);
19854 
19855  // Adds a TestPartResult to the current TestResult object. All
19856  // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)
19857  // eventually call this to report their results. The user code
19858  // should use the assertion macros instead of calling this directly.
19859  void AddTestPartResult(TestPartResult::Type result_type,
19860  const char * file_name,
19861  int line_number,
19862  const std::string & message,
19863  const std::string & os_stack_trace)
19864  GTEST_LOCK_EXCLUDED_(mutex_);
19865 
19866  // Adds a TestProperty to the current TestResult object when invoked from
19867  // inside a test, to current TestCase's ad_hoc_test_result_ when invoked
19868  // from SetUpTestCase or TearDownTestCase, or to the global property set
19869  // when invoked elsewhere. If the result already contains a property with
19870  // the same key, the value will be updated.
19871  void RecordProperty(const std::string & key, const std::string & value);
19872 
19873  // Gets the i-th test case among all the test cases. i can range from 0 to
19874  // total_test_case_count() - 1. If i is not in that range, returns NULL.
19875  TestCase * GetMutableTestCase(int i);
19876 
19877  // Accessors for the implementation object.
19878  internal::UnitTestImpl * impl() { return impl_; }
19879  const internal::UnitTestImpl * impl() const { return impl_; }
19880 
19881  // These classes and funcions are friends as they need to access private
19882  // members of UnitTest.
19883  friend class Test;
19884  friend class internal::AssertHelper;
19885  friend class internal::ScopedTrace;
19886  friend class internal::StreamingListenerTest;
19891  TestPartResult::Type result_type,
19892  const std::string & message);
19893 
19894  // Creates an empty UnitTest.
19895  UnitTest();
19896 
19897  // D'tor
19898  virtual ~UnitTest();
19899 
19900  // Pushes a trace defined by SCOPED_TRACE() on to the per-thread
19901  // Google Test trace stack.
19902  void PushGTestTrace(const internal::TraceInfo & trace)
19903  GTEST_LOCK_EXCLUDED_(mutex_);
19904 
19905  // Pops a trace from the per-thread Google Test trace stack.
19906  void PopGTestTrace()
19907  GTEST_LOCK_EXCLUDED_(mutex_);
19908 
19909  // Protects mutable state in *impl_. This is mutable as some const
19910  // methods need to lock it too.
19911  mutable internal::Mutex mutex_;
19912 
19913  // Opaque implementation object. This field is never changed once
19914  // the object is constructed. We don't mark it as const here, as
19915  // doing so will cause a warning in the constructor of UnitTest.
19916  // Mutable state in *impl_ is protected by mutex_.
19917  internal::UnitTestImpl * impl_;
19918 
19919  // We disallow copying UnitTest.
19921 };
19922 
19923 // A convenient wrapper for adding an environment for the test
19924 // program.
19925 //
19926 // You should call this before RUN_ALL_TESTS() is called, probably in
19927 // main(). If you use gtest_main, you need to call this before main()
19928 // starts for it to take effect. For example, you can define a global
19929 // variable like this:
19930 //
19931 // testing::Environment* const foo_env =
19932 // testing::AddGlobalTestEnvironment(new FooEnvironment);
19933 //
19934 // However, we strongly recommend you to write your own main() and
19935 // call AddGlobalTestEnvironment() there, as relying on initialization
19936 // of global variables makes the code harder to read and may cause
19937 // problems when you register multiple environments from different
19938 // translation units and the environments have dependencies among them
19939 // (remember that the compiler doesn't guarantee the order in which
19940 // global variables from different translation units are initialized).
19942 {
19943  return UnitTest::GetInstance()->AddEnvironment(env);
19944 }
19945 
19946 // Initializes Google Test. This must be called before calling
19947 // RUN_ALL_TESTS(). In particular, it parses a command line for the
19948 // flags that Google Test recognizes. Whenever a Google Test flag is
19949 // seen, it is removed from argv, and *argc is decremented.
19950 //
19951 // No value is returned. Instead, the Google Test flag variables are
19952 // updated.
19953 //
19954 // Calling the function for the second time has no user-visible effect.
19955 GTEST_API_ void InitGoogleTest(int * argc, char ** argv);
19956 
19957 // This overloaded version can be used in Windows programs compiled in
19958 // UNICODE mode.
19959 GTEST_API_ void InitGoogleTest(int * argc, wchar_t ** argv);
19960 
19961 namespace internal
19962 {
19963 
19964 // FormatForComparison<ToPrint, OtherOperand>::Format(value) formats a
19965 // value of type ToPrint that is an operand of a comparison assertion
19966 // (e.g. ASSERT_EQ). OtherOperand is the type of the other operand in
19967 // the comparison, and is used to help determine the best way to
19968 // format the value. In particular, when the value is a C string
19969 // (char pointer) and the other operand is an STL string object, we
19970 // want to format the C string as a string, since we know it is
19971 // compared by value with the string object. If the value is a char
19972 // pointer but the other operand is not an STL string object, we don't
19973 // know whether the pointer is supposed to point to a NUL-terminated
19974 // string, and thus want to print it as a pointer to be safe.
19975 //
19976 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
19977 
19978 // The default case.
19979 template <typename ToPrint, typename OtherOperand>
19980 class FormatForComparison
19981 {
19982 public:
19983  static ::std::string Format(const ToPrint & value)
19984  {
19986  }
19987 };
19988 
19989 // Array.
19990 template <typename ToPrint, size_t N, typename OtherOperand>
19991 class FormatForComparison<ToPrint[N], OtherOperand>
19992 {
19993 public:
19994  static ::std::string Format(const ToPrint * value)
19995  {
19997  }
19998 };
19999 
20000 // By default, print C string as pointers to be safe, as we don't know
20001 // whether they actually point to a NUL-terminated string.
20002 
20003 #define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType) \
20004  template <typename OtherOperand> \
20005  class FormatForComparison<CharType*, OtherOperand> { \
20006  public: \
20007  static ::std::string Format(CharType* value) { \
20008  return ::testing::PrintToString(static_cast<const void*>(value)); \
20009  } \
20010  }
20011 
20016 
20017 #undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_
20018 
20019 // If a C string is compared with an STL string object, we know it's meant
20020 // to point to a NUL-terminated string, and thus can print it as a string.
20021 
20022 #define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \
20023  template <> \
20024  class FormatForComparison<CharType*, OtherStringType> { \
20025  public: \
20026  static ::std::string Format(CharType* value) { \
20027  return ::testing::PrintToString(value); \
20028  } \
20029  }
20030 
20033 
20034 #if GTEST_HAS_GLOBAL_STRING
20036 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::string);
20037 #endif
20038 
20039 #if GTEST_HAS_GLOBAL_WSTRING
20040 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::wstring);
20041 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::wstring);
20042 #endif
20043 
20044 #if GTEST_HAS_STD_WSTRING
20047 #endif
20048 
20049 #undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_
20050 
20051 // Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)
20052 // operand to be used in a failure message. The type (but not value)
20053 // of the other operand may affect the format. This allows us to
20054 // print a char* as a raw pointer when it is compared against another
20055 // char* or void*, and print it as a C string when it is compared
20056 // against an std::string object, for example.
20057 //
20058 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20059 template <typename T1, typename T2>
20061  const T1 & value, const T2 & /* other_operand */)
20062 {
20063  return FormatForComparison<T1, T2>::Format(value);
20064 }
20065 
20066 // The helper function for {ASSERT|EXPECT}_EQ.
20067 template <typename T1, typename T2>
20068 AssertionResult CmpHelperEQ(const char * expected_expression,
20069  const char * actual_expression,
20070  const T1 & expected,
20071  const T2 & actual)
20072 {
20073 #ifdef _MSC_VER
20074 # pragma warning(push) // Saves the current warning state.
20075 # pragma warning(disable:4389) // Temporarily disables warning on
20076  // signed/unsigned mismatch.
20077 #endif
20078 
20079  if (expected == actual)
20080  {
20081  return AssertionSuccess();
20082  }
20083 
20084 #ifdef _MSC_VER
20085 # pragma warning(pop) // Restores the warning state.
20086 #endif
20087 
20088  return EqFailure(expected_expression,
20089  actual_expression,
20090  FormatForComparisonFailureMessage(expected, actual),
20091  FormatForComparisonFailureMessage(actual, expected),
20092  false);
20093 }
20094 
20095 // With this overloaded version, we allow anonymous enums to be used
20096 // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums
20097 // can be implicitly cast to BiggestInt.
20098 GTEST_API_ AssertionResult CmpHelperEQ(const char * expected_expression,
20099  const char * actual_expression,
20100  BiggestInt expected,
20101  BiggestInt actual);
20102 
20103 // The helper class for {ASSERT|EXPECT}_EQ. The template argument
20104 // lhs_is_null_literal is true iff the first argument to ASSERT_EQ()
20105 // is a null pointer literal. The following default implementation is
20106 // for lhs_is_null_literal being false.
20107 template <bool lhs_is_null_literal>
20108 class EqHelper
20109 {
20110 public:
20111  // This templatized version is for the general case.
20112  template <typename T1, typename T2>
20113  static AssertionResult Compare(const char * expected_expression,
20114  const char * actual_expression,
20115  const T1 & expected,
20116  const T2 & actual)
20117  {
20118  return CmpHelperEQ(expected_expression, actual_expression, expected,
20119  actual);
20120  }
20121 
20122  // With this overloaded version, we allow anonymous enums to be used
20123  // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous
20124  // enums can be implicitly cast to BiggestInt.
20125  //
20126  // Even though its body looks the same as the above version, we
20127  // cannot merge the two, as it will make anonymous enums unhappy.
20128  static AssertionResult Compare(const char * expected_expression,
20129  const char * actual_expression,
20130  BiggestInt expected,
20131  BiggestInt actual)
20132  {
20133  return CmpHelperEQ(expected_expression, actual_expression, expected,
20134  actual);
20135  }
20136 };
20137 
20138 // This specialization is used when the first argument to ASSERT_EQ()
20139 // is a null pointer literal, like NULL, false, or 0.
20140 template <>
20141 class EqHelper<true>
20142 {
20143 public:
20144  // We define two overloaded versions of Compare(). The first
20145  // version will be picked when the second argument to ASSERT_EQ() is
20146  // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or
20147  // EXPECT_EQ(false, a_bool).
20148  template <typename T1, typename T2>
20149  static AssertionResult Compare(
20150  const char * expected_expression,
20151  const char * actual_expression,
20152  const T1 & expected,
20153  const T2 & actual,
20154  // The following line prevents this overload from being considered if T2
20155  // is not a pointer type. We need this because ASSERT_EQ(NULL, my_ptr)
20156  // expands to Compare("", "", NULL, my_ptr), which requires a conversion
20157  // to match the Secret* in the other overload, which would otherwise make
20158  // this template match better.
20159  typename EnableIf < !is_pointer<T2>::value >::type * = 0)
20160  {
20161  return CmpHelperEQ(expected_expression, actual_expression, expected,
20162  actual);
20163  }
20164 
20165  // This version will be picked when the second argument to ASSERT_EQ() is a
20166  // pointer, e.g. ASSERT_EQ(NULL, a_pointer).
20167  template <typename T>
20168  static AssertionResult Compare(
20169  const char * expected_expression,
20170  const char * actual_expression,
20171  // We used to have a second template parameter instead of Secret*. That
20172  // template parameter would deduce to 'long', making this a better match
20173  // than the first overload even without the first overload's EnableIf.
20174  // Unfortunately, gcc with -Wconversion-null warns when "passing NULL to
20175  // non-pointer argument" (even a deduced integral argument), so the old
20176  // implementation caused warnings in user code.
20177  Secret * /* expected (NULL) */,
20178  T * actual)
20179  {
20180  // We already know that 'expected' is a null pointer.
20181  return CmpHelperEQ(expected_expression, actual_expression,
20182  static_cast<T *>(NULL), actual);
20183  }
20184 };
20185 
20186 // A macro for implementing the helper functions needed to implement
20187 // ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste
20188 // of similar code.
20189 //
20190 // For each templatized helper function, we also define an overloaded
20191 // version for BiggestInt in order to reduce code bloat and allow
20192 // anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled
20193 // with gcc 4.
20194 //
20195 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20196 #define GTEST_IMPL_CMP_HELPER_(op_name, op)\
20197 template <typename T1, typename T2>\
20198 AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
20199  const T1& val1, const T2& val2) {\
20200  if (val1 op val2) {\
20201  return AssertionSuccess();\
20202  } else {\
20203  return AssertionFailure() \
20204  << "Expected: (" << expr1 << ") " #op " (" << expr2\
20205  << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\
20206  << " vs " << FormatForComparisonFailureMessage(val2, val1);\
20207  }\
20208 }\
20209 GTEST_API_ AssertionResult CmpHelper##op_name(\
20210  const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2)
20211 
20212 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20213 
20214 // Implements the helper function for {ASSERT|EXPECT}_NE
20215 GTEST_IMPL_CMP_HELPER_(NE, !=);
20216 // Implements the helper function for {ASSERT|EXPECT}_LE
20217 GTEST_IMPL_CMP_HELPER_(LE, <=);
20218 // Implements the helper function for {ASSERT|EXPECT}_LT
20219 GTEST_IMPL_CMP_HELPER_(LT, <);
20220 // Implements the helper function for {ASSERT|EXPECT}_GE
20221 GTEST_IMPL_CMP_HELPER_(GE, >=);
20222 // Implements the helper function for {ASSERT|EXPECT}_GT
20223 GTEST_IMPL_CMP_HELPER_(GT, >);
20224 
20225 #undef GTEST_IMPL_CMP_HELPER_
20226 
20227 // The helper function for {ASSERT|EXPECT}_STREQ.
20228 //
20229 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20230 GTEST_API_ AssertionResult CmpHelperSTREQ(const char * expected_expression,
20231  const char * actual_expression,
20232  const char * expected,
20233  const char * actual);
20234 
20235 // The helper function for {ASSERT|EXPECT}_STRCASEEQ.
20236 //
20237 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20238 GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char * expected_expression,
20239  const char * actual_expression,
20240  const char * expected,
20241  const char * actual);
20242 
20243 // The helper function for {ASSERT|EXPECT}_STRNE.
20244 //
20245 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20246 GTEST_API_ AssertionResult CmpHelperSTRNE(const char * s1_expression,
20247  const char * s2_expression,
20248  const char * s1,
20249  const char * s2);
20250 
20251 // The helper function for {ASSERT|EXPECT}_STRCASENE.
20252 //
20253 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20254 GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char * s1_expression,
20255  const char * s2_expression,
20256  const char * s1,
20257  const char * s2);
20258 
20259 
20260 // Helper function for *_STREQ on wide strings.
20261 //
20262 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20263 GTEST_API_ AssertionResult CmpHelperSTREQ(const char * expected_expression,
20264  const char * actual_expression,
20265  const wchar_t * expected,
20266  const wchar_t * actual);
20267 
20268 // Helper function for *_STRNE on wide strings.
20269 //
20270 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20271 GTEST_API_ AssertionResult CmpHelperSTRNE(const char * s1_expression,
20272  const char * s2_expression,
20273  const wchar_t * s1,
20274  const wchar_t * s2);
20275 
20276 } // namespace internal
20277 
20278 // IsSubstring() and IsNotSubstring() are intended to be used as the
20279 // first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by
20280 // themselves. They check whether needle is a substring of haystack
20281 // (NULL is considered a substring of itself only), and return an
20282 // appropriate error message when they fail.
20283 //
20284 // The {needle,haystack}_expr arguments are the stringified
20285 // expressions that generated the two real arguments.
20286 GTEST_API_ AssertionResult IsSubstring(
20287  const char * needle_expr, const char * haystack_expr,
20288  const char * needle, const char * haystack);
20289 GTEST_API_ AssertionResult IsSubstring(
20290  const char * needle_expr, const char * haystack_expr,
20291  const wchar_t * needle, const wchar_t * haystack);
20292 GTEST_API_ AssertionResult IsNotSubstring(
20293  const char * needle_expr, const char * haystack_expr,
20294  const char * needle, const char * haystack);
20295 GTEST_API_ AssertionResult IsNotSubstring(
20296  const char * needle_expr, const char * haystack_expr,
20297  const wchar_t * needle, const wchar_t * haystack);
20298 GTEST_API_ AssertionResult IsSubstring(
20299  const char * needle_expr, const char * haystack_expr,
20300  const ::std::string & needle, const ::std::string & haystack);
20301 GTEST_API_ AssertionResult IsNotSubstring(
20302  const char * needle_expr, const char * haystack_expr,
20303  const ::std::string & needle, const ::std::string & haystack);
20304 
20305 #if GTEST_HAS_STD_WSTRING
20306 GTEST_API_ AssertionResult IsSubstring(
20307  const char * needle_expr, const char * haystack_expr,
20308  const ::std::wstring & needle, const ::std::wstring & haystack);
20309 GTEST_API_ AssertionResult IsNotSubstring(
20310  const char * needle_expr, const char * haystack_expr,
20311  const ::std::wstring & needle, const ::std::wstring & haystack);
20312 #endif // GTEST_HAS_STD_WSTRING
20313 
20314 namespace internal
20315 {
20316 
20317 // Helper template function for comparing floating-points.
20318 //
20319 // Template parameter:
20320 //
20321 // RawType: the raw floating-point type (either float or double)
20322 //
20323 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20324 template <typename RawType>
20325 AssertionResult CmpHelperFloatingPointEQ(const char * expected_expression,
20326  const char * actual_expression,
20327  RawType expected,
20328  RawType actual)
20329 {
20330  const FloatingPoint<RawType> lhs(expected), rhs(actual);
20331 
20332  if (lhs.AlmostEquals(rhs))
20333  {
20334  return AssertionSuccess();
20335  }
20336 
20337  ::std::stringstream expected_ss;
20338  expected_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
20339  << expected;
20340 
20341  ::std::stringstream actual_ss;
20342  actual_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
20343  << actual;
20344 
20345  return EqFailure(expected_expression,
20346  actual_expression,
20347  StringStreamToString(&expected_ss),
20348  StringStreamToString(&actual_ss),
20349  false);
20350 }
20351 
20352 // Helper function for implementing ASSERT_NEAR.
20353 //
20354 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
20355 GTEST_API_ AssertionResult DoubleNearPredFormat(const char * expr1,
20356  const char * expr2,
20357  const char * abs_error_expr,
20358  double val1,
20359  double val2,
20360  double abs_error);
20361 
20362 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
20363 // A class that enables one to stream messages to assertion macros
20364 class GTEST_API_ AssertHelper
20365 {
20366 public:
20367  // Constructor.
20368  AssertHelper(TestPartResult::Type type,
20369  const char * file,
20370  int line,
20371  const char * message);
20372  ~AssertHelper();
20373 
20374  // Message assignment is a semantic trick to enable assertion
20375  // streaming; see the GTEST_MESSAGE_ macro below.
20376  void operator=(const Message & message) const;
20377 
20378 private:
20379  // We put our data in a struct so that the size of the AssertHelper class can
20380  // be as small as possible. This is important because gcc is incapable of
20381  // re-using stack space even for temporary variables, so every EXPECT_EQ
20382  // reserves stack space for another AssertHelper.
20383  struct AssertHelperData
20384  {
20386  const char * srcfile,
20387  int line_num,
20388  const char * msg)
20389  : type(t), file(srcfile), line(line_num), message(msg) { }
20390 
20391  TestPartResult::Type const type;
20392  const char * const file;
20393  int const line;
20394  std::string const message;
20395 
20396  private:
20398  };
20399 
20400  AssertHelperData * const data_;
20401 
20403 };
20404 
20405 } // namespace internal
20406 
20407 #if GTEST_HAS_PARAM_TEST
20408 // The pure interface class that all value-parameterized tests inherit from.
20409 // A value-parameterized class must inherit from both ::testing::Test and
20410 // ::testing::WithParamInterface. In most cases that just means inheriting
20411 // from ::testing::TestWithParam, but more complicated test hierarchies
20412 // may need to inherit from Test and WithParamInterface at different levels.
20413 //
20414 // This interface has support for accessing the test parameter value via
20415 // the GetParam() method.
20416 //
20417 // Use it with one of the parameter generator defining functions, like Range(),
20418 // Values(), ValuesIn(), Bool(), and Combine().
20419 //
20420 // class FooTest : public ::testing::TestWithParam<int> {
20421 // protected:
20422 // FooTest() {
20423 // // Can use GetParam() here.
20424 // }
20425 // virtual ~FooTest() {
20426 // // Can use GetParam() here.
20427 // }
20428 // virtual void SetUp() {
20429 // // Can use GetParam() here.
20430 // }
20431 // virtual void TearDown {
20432 // // Can use GetParam() here.
20433 // }
20434 // };
20435 // TEST_P(FooTest, DoesBar) {
20436 // // Can use GetParam() method here.
20437 // Foo foo;
20438 // ASSERT_TRUE(foo.DoesBar(GetParam()));
20439 // }
20440 // INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));
20441 
20442 template <typename T>
20443 class WithParamInterface
20444 {
20445 public:
20446  typedef T ParamType;
20447  virtual ~WithParamInterface() {}
20448 
20449  // The current parameter value. Is also available in the test fixture's
20450  // constructor. This member function is non-static, even though it only
20451  // references static data, to reduce the opportunity for incorrect uses
20452  // like writing 'WithParamInterface<bool>::GetParam()' for a test that
20453  // uses a fixture whose parameter type is int.
20454  const ParamType & GetParam() const
20455  {
20456  GTEST_CHECK_(parameter_ != NULL)
20457  << "GetParam() can only be called inside a value-parameterized test "
20458  << "-- did you intend to write TEST_P instead of TEST_F?";
20459  return *parameter_;
20460  }
20461 
20462 private:
20463  // Sets parameter value. The caller is responsible for making sure the value
20464  // remains alive and unchanged throughout the current test.
20465  static void SetParam(const ParamType * parameter)
20466  {
20467  parameter_ = parameter;
20468  }
20469 
20470  // Static value used for accessing parameter during a test lifetime.
20471  static const ParamType * parameter_;
20472 
20473  // TestClass must be a subclass of WithParamInterface<T> and Test.
20474  template <class TestClass> friend class internal::ParameterizedTestFactory;
20475 };
20476 
20477 template <typename T>
20478 const T * WithParamInterface<T>::parameter_ = NULL;
20479 
20480 // Most value-parameterized classes can ignore the existence of
20481 // WithParamInterface, and can just inherit from ::testing::TestWithParam.
20482 
20483 template <typename T>
20484 class TestWithParam : public Test, public WithParamInterface<T>
20485 {
20486 };
20487 
20488 #endif // GTEST_HAS_PARAM_TEST
20489 
20490 // Macros for indicating success/failure in test code.
20491 
20492 // ADD_FAILURE unconditionally adds a failure to the current test.
20493 // SUCCEED generates a success - it doesn't automatically make the
20494 // current test successful, as a test is only successful when it has
20495 // no failure.
20496 //
20497 // EXPECT_* verifies that a certain condition is satisfied. If not,
20498 // it behaves like ADD_FAILURE. In particular:
20499 //
20500 // EXPECT_TRUE verifies that a Boolean condition is true.
20501 // EXPECT_FALSE verifies that a Boolean condition is false.
20502 //
20503 // FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except
20504 // that they will also abort the current function on failure. People
20505 // usually want the fail-fast behavior of FAIL and ASSERT_*, but those
20506 // writing data-driven tests often find themselves using ADD_FAILURE
20507 // and EXPECT_* more.
20508 
20509 // Generates a nonfatal failure with a generic message.
20510 #define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
20511 
20512 // Generates a nonfatal failure at the given source file location with
20513 // a generic message.
20514 #define ADD_FAILURE_AT(file, line) \
20515  GTEST_MESSAGE_AT_(file, line, "Failed", \
20516  ::testing::TestPartResult::kNonFatalFailure)
20517 
20518 // Generates a fatal failure with a generic message.
20519 #define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed")
20520 
20521 // Define this macro to 1 to omit the definition of FAIL(), which is a
20522 // generic name and clashes with some other libraries.
20523 #if !GTEST_DONT_DEFINE_FAIL
20524 # define FAIL() GTEST_FAIL()
20525 #endif
20526 
20527 // Generates a success with a generic message.
20528 #define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded")
20529 
20530 // Define this macro to 1 to omit the definition of SUCCEED(), which
20531 // is a generic name and clashes with some other libraries.
20532 #if !GTEST_DONT_DEFINE_SUCCEED
20533 # define SUCCEED() GTEST_SUCCEED()
20534 #endif
20535 
20536 // Macros for testing exceptions.
20537 //
20538 // * {ASSERT|EXPECT}_THROW(statement, expected_exception):
20539 // Tests that the statement throws the expected exception.
20540 // * {ASSERT|EXPECT}_NO_THROW(statement):
20541 // Tests that the statement doesn't throw any exception.
20542 // * {ASSERT|EXPECT}_ANY_THROW(statement):
20543 // Tests that the statement throws an exception.
20544 
20545 #define EXPECT_THROW(statement, expected_exception) \
20546  GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_)
20547 #define EXPECT_NO_THROW(statement) \
20548  GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_)
20549 #define EXPECT_ANY_THROW(statement) \
20550  GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_)
20551 #define ASSERT_THROW(statement, expected_exception) \
20552  GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_)
20553 #define ASSERT_NO_THROW(statement) \
20554  GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_)
20555 #define ASSERT_ANY_THROW(statement) \
20556  GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_)
20557 
20558 // Boolean assertions. Condition can be either a Boolean expression or an
20559 // AssertionResult. For more information on how to use AssertionResult with
20560 // these macros see comments on that class.
20561 #define EXPECT_TRUE(condition) \
20562  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
20563  GTEST_NONFATAL_FAILURE_)
20564 #define EXPECT_FALSE(condition) \
20565  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
20566  GTEST_NONFATAL_FAILURE_)
20567 #define ASSERT_TRUE(condition) \
20568  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
20569  GTEST_FATAL_FAILURE_)
20570 #define ASSERT_FALSE(condition) \
20571  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
20572  GTEST_FATAL_FAILURE_)
20573 
20574 // Includes the auto-generated header that implements a family of
20575 // generic predicate assertion macros.
20576 // Copyright 2006, Google Inc.
20577 // All rights reserved.
20578 //
20579 // Redistribution and use in source and binary forms, with or without
20580 // modification, are permitted provided that the following conditions are
20581 // met:
20582 //
20583 // * Redistributions of source code must retain the above copyright
20584 // notice, this list of conditions and the following disclaimer.
20585 // * Redistributions in binary form must reproduce the above
20586 // copyright notice, this list of conditions and the following disclaimer
20587 // in the documentation and/or other materials provided with the
20588 // distribution.
20589 // * Neither the name of Google Inc. nor the names of its
20590 // contributors may be used to endorse or promote products derived from
20591 // this software without specific prior written permission.
20592 //
20593 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20594 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20595 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20596 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20597 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20598 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20599 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20600 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20601 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20602 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20603 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20604 
20605 // This file is AUTOMATICALLY GENERATED on 10/31/2011 by command
20606 // 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND!
20607 //
20608 // Implements a family of generic predicate assertion macros.
20609 
20610 #ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
20611 #define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
20612 
20613 // Makes sure this header is not included before gtest.h.
20614 #ifndef GTEST_INCLUDE_GTEST_GTEST_H_
20615 # error Do not include gtest_pred_impl.h directly. Include gtest.h instead.
20616 #endif // GTEST_INCLUDE_GTEST_GTEST_H_
20617 
20618 // This header implements a family of generic predicate assertion
20619 // macros:
20620 //
20621 // ASSERT_PRED_FORMAT1(pred_format, v1)
20622 // ASSERT_PRED_FORMAT2(pred_format, v1, v2)
20623 // ...
20624 //
20625 // where pred_format is a function or functor that takes n (in the
20626 // case of ASSERT_PRED_FORMATn) values and their source expression
20627 // text, and returns a testing::AssertionResult. See the definition
20628 // of ASSERT_EQ in gtest.h for an example.
20629 //
20630 // If you don't care about formatting, you can use the more
20631 // restrictive version:
20632 //
20633 // ASSERT_PRED1(pred, v1)
20634 // ASSERT_PRED2(pred, v1, v2)
20635 // ...
20636 //
20637 // where pred is an n-ary function or functor that returns bool,
20638 // and the values v1, v2, ..., must support the << operator for
20639 // streaming to std::ostream.
20640 //
20641 // We also define the EXPECT_* variations.
20642 //
20643 // For now we only support predicates whose arity is at most 5.
20644 // Please email googletestframework@googlegroups.com if you need
20645 // support for higher arities.
20646 
20647 // GTEST_ASSERT_ is the basic statement to which all of the assertions
20648 // in this file reduce. Don't use this in your code.
20649 
20650 #define GTEST_ASSERT_(expression, on_failure) \
20651  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
20652  if (const ::testing::AssertionResult gtest_ar = (expression)) \
20653  ; \
20654  else \
20655  on_failure(gtest_ar.failure_message())
20656 
20657 
20658 // Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use
20659 // this in your code.
20660 template <typename Pred,
20661  typename T1>
20662 AssertionResult AssertPred1Helper(const char * pred_text,
20663  const char * e1,
20664  Pred pred,
20665  const T1 & v1)
20666 {
20667  if (pred(v1)) { return AssertionSuccess(); }
20668 
20669  return AssertionFailure() << pred_text << "("
20670  << e1 << ") evaluates to false, where"
20671  << "\n" << e1 << " evaluates to " << v1;
20672 }
20673 
20674 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1.
20675 // Don't use this in your code.
20676 #define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\
20677  GTEST_ASSERT_(pred_format(#v1, v1), \
20678  on_failure)
20679 
20680 // Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use
20681 // this in your code.
20682 #define GTEST_PRED1_(pred, v1, on_failure)\
20683  GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \
20684  #v1, \
20685  pred, \
20686  v1), on_failure)
20687 
20688 // Unary predicate assertion macros.
20689 #define EXPECT_PRED_FORMAT1(pred_format, v1) \
20690  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
20691 #define EXPECT_PRED1(pred, v1) \
20692  GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_)
20693 #define ASSERT_PRED_FORMAT1(pred_format, v1) \
20694  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
20695 #define ASSERT_PRED1(pred, v1) \
20696  GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_)
20697 
20698 
20699 
20700 // Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use
20701 // this in your code.
20702 template <typename Pred,
20703  typename T1,
20704  typename T2>
20705 AssertionResult AssertPred2Helper(const char * pred_text,
20706  const char * e1,
20707  const char * e2,
20708  Pred pred,
20709  const T1 & v1,
20710  const T2 & v2)
20711 {
20712  if (pred(v1, v2)) { return AssertionSuccess(); }
20713 
20714  return AssertionFailure() << pred_text << "("
20715  << e1 << ", "
20716  << e2 << ") evaluates to false, where"
20717  << "\n" << e1 << " evaluates to " << v1
20718  << "\n" << e2 << " evaluates to " << v2;
20719 }
20720 
20721 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2.
20722 // Don't use this in your code.
20723 #define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\
20724  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \
20725  on_failure)
20726 
20727 // Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use
20728 // this in your code.
20729 #define GTEST_PRED2_(pred, v1, v2, on_failure)\
20730  GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \
20731  #v1, \
20732  #v2, \
20733  pred, \
20734  v1, \
20735  v2), on_failure)
20736 
20737 // Binary predicate assertion macros.
20738 #define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \
20739  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
20740 #define EXPECT_PRED2(pred, v1, v2) \
20741  GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_)
20742 #define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \
20743  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
20744 #define ASSERT_PRED2(pred, v1, v2) \
20745  GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_)
20746 
20747 
20748 
20749 // Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use
20750 // this in your code.
20751 template <typename Pred,
20752  typename T1,
20753  typename T2,
20754  typename T3>
20755 AssertionResult AssertPred3Helper(const char * pred_text,
20756  const char * e1,
20757  const char * e2,
20758  const char * e3,
20759  Pred pred,
20760  const T1 & v1,
20761  const T2 & v2,
20762  const T3 & v3)
20763 {
20764  if (pred(v1, v2, v3)) { return AssertionSuccess(); }
20765 
20766  return AssertionFailure() << pred_text << "("
20767  << e1 << ", "
20768  << e2 << ", "
20769  << e3 << ") evaluates to false, where"
20770  << "\n" << e1 << " evaluates to " << v1
20771  << "\n" << e2 << " evaluates to " << v2
20772  << "\n" << e3 << " evaluates to " << v3;
20773 }
20774 
20775 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3.
20776 // Don't use this in your code.
20777 #define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\
20778  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \
20779  on_failure)
20780 
20781 // Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use
20782 // this in your code.
20783 #define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\
20784  GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \
20785  #v1, \
20786  #v2, \
20787  #v3, \
20788  pred, \
20789  v1, \
20790  v2, \
20791  v3), on_failure)
20792 
20793 // Ternary predicate assertion macros.
20794 #define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \
20795  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
20796 #define EXPECT_PRED3(pred, v1, v2, v3) \
20797  GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
20798 #define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \
20799  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_)
20800 #define ASSERT_PRED3(pred, v1, v2, v3) \
20801  GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_)
20802 
20803 
20804 
20805 // Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use
20806 // this in your code.
20807 template <typename Pred,
20808  typename T1,
20809  typename T2,
20810  typename T3,
20811  typename T4>
20812 AssertionResult AssertPred4Helper(const char * pred_text,
20813  const char * e1,
20814  const char * e2,
20815  const char * e3,
20816  const char * e4,
20817  Pred pred,
20818  const T1 & v1,
20819  const T2 & v2,
20820  const T3 & v3,
20821  const T4 & v4)
20822 {
20823  if (pred(v1, v2, v3, v4)) { return AssertionSuccess(); }
20824 
20825  return AssertionFailure() << pred_text << "("
20826  << e1 << ", "
20827  << e2 << ", "
20828  << e3 << ", "
20829  << e4 << ") evaluates to false, where"
20830  << "\n" << e1 << " evaluates to " << v1
20831  << "\n" << e2 << " evaluates to " << v2
20832  << "\n" << e3 << " evaluates to " << v3
20833  << "\n" << e4 << " evaluates to " << v4;
20834 }
20835 
20836 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4.
20837 // Don't use this in your code.
20838 #define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\
20839  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), \
20840  on_failure)
20841 
20842 // Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use
20843 // this in your code.
20844 #define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\
20845  GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \
20846  #v1, \
20847  #v2, \
20848  #v3, \
20849  #v4, \
20850  pred, \
20851  v1, \
20852  v2, \
20853  v3, \
20854  v4), on_failure)
20855 
20856 // 4-ary predicate assertion macros.
20857 #define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
20858  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
20859 #define EXPECT_PRED4(pred, v1, v2, v3, v4) \
20860  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
20861 #define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
20862  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
20863 #define ASSERT_PRED4(pred, v1, v2, v3, v4) \
20864  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
20865 
20866 
20867 
20868 // Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use
20869 // this in your code.
20870 template <typename Pred,
20871  typename T1,
20872  typename T2,
20873  typename T3,
20874  typename T4,
20875  typename T5>
20876 AssertionResult AssertPred5Helper(const char * pred_text,
20877  const char * e1,
20878  const char * e2,
20879  const char * e3,
20880  const char * e4,
20881  const char * e5,
20882  Pred pred,
20883  const T1 & v1,
20884  const T2 & v2,
20885  const T3 & v3,
20886  const T4 & v4,
20887  const T5 & v5)
20888 {
20889  if (pred(v1, v2, v3, v4, v5)) { return AssertionSuccess(); }
20890 
20891  return AssertionFailure() << pred_text << "("
20892  << e1 << ", "
20893  << e2 << ", "
20894  << e3 << ", "
20895  << e4 << ", "
20896  << e5 << ") evaluates to false, where"
20897  << "\n" << e1 << " evaluates to " << v1
20898  << "\n" << e2 << " evaluates to " << v2
20899  << "\n" << e3 << " evaluates to " << v3
20900  << "\n" << e4 << " evaluates to " << v4
20901  << "\n" << e5 << " evaluates to " << v5;
20902 }
20903 
20904 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5.
20905 // Don't use this in your code.
20906 #define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\
20907  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5), \
20908  on_failure)
20909 
20910 // Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use
20911 // this in your code.
20912 #define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\
20913  GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \
20914  #v1, \
20915  #v2, \
20916  #v3, \
20917  #v4, \
20918  #v5, \
20919  pred, \
20920  v1, \
20921  v2, \
20922  v3, \
20923  v4, \
20924  v5), on_failure)
20925 
20926 // 5-ary predicate assertion macros.
20927 #define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
20928  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
20929 #define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \
20930  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
20931 #define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
20932  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
20933 #define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \
20934  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
20935 
20936 
20937 
20938 #endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
20939 
20940 // Macros for testing equalities and inequalities.
20941 //
20942 // * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual
20943 // * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2
20944 // * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2
20945 // * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2
20946 // * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2
20947 // * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2
20948 //
20949 // When they are not, Google Test prints both the tested expressions and
20950 // their actual values. The values must be compatible built-in types,
20951 // or you will get a compiler error. By "compatible" we mean that the
20952 // values can be compared by the respective operator.
20953 //
20954 // Note:
20955 //
20956 // 1. It is possible to make a user-defined type work with
20957 // {ASSERT|EXPECT}_??(), but that requires overloading the
20958 // comparison operators and is thus discouraged by the Google C++
20959 // Usage Guide. Therefore, you are advised to use the
20960 // {ASSERT|EXPECT}_TRUE() macro to assert that two objects are
20961 // equal.
20962 //
20963 // 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on
20964 // pointers (in particular, C strings). Therefore, if you use it
20965 // with two C strings, you are testing how their locations in memory
20966 // are related, not how their content is related. To compare two C
20967 // strings by content, use {ASSERT|EXPECT}_STR*().
20968 //
20969 // 3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to
20970 // {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you
20971 // what the actual value is when it fails, and similarly for the
20972 // other comparisons.
20973 //
20974 // 4. Do not depend on the order in which {ASSERT|EXPECT}_??()
20975 // evaluate their arguments, which is undefined.
20976 //
20977 // 5. These macros evaluate their arguments exactly once.
20978 //
20979 // Examples:
20980 //
20981 // EXPECT_NE(5, Foo());
20982 // EXPECT_EQ(NULL, a_pointer);
20983 // ASSERT_LT(i, array_size);
20984 // ASSERT_GT(records.size(), 0) << "There is no record left.";
20985 
20986 #define EXPECT_EQ(expected, actual) \
20987  EXPECT_PRED_FORMAT2(::testing::internal:: \
20988  EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
20989  expected, actual)
20990 #define EXPECT_NE(expected, actual) \
20991  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual)
20992 #define EXPECT_LE(val1, val2) \
20993  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
20994 #define EXPECT_LT(val1, val2) \
20995  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
20996 #define EXPECT_GE(val1, val2) \
20997  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
20998 #define EXPECT_GT(val1, val2) \
20999  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
21000 
21001 #define GTEST_ASSERT_EQ(expected, actual) \
21002  ASSERT_PRED_FORMAT2(::testing::internal:: \
21003  EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
21004  expected, actual)
21005 #define GTEST_ASSERT_NE(val1, val2) \
21006  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
21007 #define GTEST_ASSERT_LE(val1, val2) \
21008  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
21009 #define GTEST_ASSERT_LT(val1, val2) \
21010  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
21011 #define GTEST_ASSERT_GE(val1, val2) \
21012  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
21013 #define GTEST_ASSERT_GT(val1, val2) \
21014  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
21015 
21016 // Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of
21017 // ASSERT_XY(), which clashes with some users' own code.
21018 
21019 #if !GTEST_DONT_DEFINE_ASSERT_EQ
21020 # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
21021 #endif
21022 
21023 #if !GTEST_DONT_DEFINE_ASSERT_NE
21024 # define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2)
21025 #endif
21026 
21027 #if !GTEST_DONT_DEFINE_ASSERT_LE
21028 # define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)
21029 #endif
21030 
21031 #if !GTEST_DONT_DEFINE_ASSERT_LT
21032 # define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2)
21033 #endif
21034 
21035 #if !GTEST_DONT_DEFINE_ASSERT_GE
21036 # define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)
21037 #endif
21038 
21039 #if !GTEST_DONT_DEFINE_ASSERT_GT
21040 # define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2)
21041 #endif
21042 
21043 // C-string Comparisons. All tests treat NULL and any non-NULL string
21044 // as different. Two NULLs are equal.
21045 //
21046 // * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2
21047 // * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2
21048 // * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case
21049 // * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case
21050 //
21051 // For wide or narrow string objects, you can use the
21052 // {ASSERT|EXPECT}_??() macros.
21053 //
21054 // Don't depend on the order in which the arguments are evaluated,
21055 // which is undefined.
21056 //
21057 // These macros evaluate their arguments exactly once.
21058 
21059 #define EXPECT_STREQ(expected, actual) \
21060  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
21061 #define EXPECT_STRNE(s1, s2) \
21062  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
21063 #define EXPECT_STRCASEEQ(expected, actual) \
21064  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
21065 #define EXPECT_STRCASENE(s1, s2)\
21066  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
21067 
21068 #define ASSERT_STREQ(expected, actual) \
21069  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
21070 #define ASSERT_STRNE(s1, s2) \
21071  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
21072 #define ASSERT_STRCASEEQ(expected, actual) \
21073  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
21074 #define ASSERT_STRCASENE(s1, s2)\
21075  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
21076 
21077 // Macros for comparing floating-point numbers.
21078 //
21079 // * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual):
21080 // Tests that two float values are almost equal.
21081 // * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual):
21082 // Tests that two double values are almost equal.
21083 // * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):
21084 // Tests that v1 and v2 are within the given distance to each other.
21085 //
21086 // Google Test uses ULP-based comparison to automatically pick a default
21087 // error bound that is appropriate for the operands. See the
21088 // FloatingPoint template class in gtest-internal.h if you are
21089 // interested in the implementation details.
21090 
21091 #define EXPECT_FLOAT_EQ(expected, actual)\
21092  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
21093  expected, actual)
21094 
21095 #define EXPECT_DOUBLE_EQ(expected, actual)\
21096  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
21097  expected, actual)
21098 
21099 #define ASSERT_FLOAT_EQ(expected, actual)\
21100  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
21101  expected, actual)
21102 
21103 #define ASSERT_DOUBLE_EQ(expected, actual)\
21104  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
21105  expected, actual)
21106 
21107 #define EXPECT_NEAR(val1, val2, abs_error)\
21108  EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
21109  val1, val2, abs_error)
21110 
21111 #define ASSERT_NEAR(val1, val2, abs_error)\
21112  ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
21113  val1, val2, abs_error)
21114 
21115 // These predicate format functions work on floating-point values, and
21116 // can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.
21117 //
21118 // EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);
21119 
21120 // Asserts that val1 is less than, or almost equal to, val2. Fails
21121 // otherwise. In particular, it fails if either val1 or val2 is NaN.
21122 GTEST_API_ AssertionResult FloatLE(const char * expr1, const char * expr2,
21123  float val1, float val2);
21124 GTEST_API_ AssertionResult DoubleLE(const char * expr1, const char * expr2,
21125  double val1, double val2);
21126 
21127 
21128 #if GTEST_OS_WINDOWS
21129 
21130 // Macros that test for HRESULT failure and success, these are only useful
21131 // on Windows, and rely on Windows SDK macros and APIs to compile.
21132 //
21133 // * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr)
21134 //
21135 // When expr unexpectedly fails or succeeds, Google Test prints the
21136 // expected result and the actual result with both a human-readable
21137 // string representation of the error, if available, as well as the
21138 // hex result code.
21139 # define EXPECT_HRESULT_SUCCEEDED(expr) \
21140  EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
21141 
21142 # define ASSERT_HRESULT_SUCCEEDED(expr) \
21143  ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
21144 
21145 # define EXPECT_HRESULT_FAILED(expr) \
21146  EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
21147 
21148 # define ASSERT_HRESULT_FAILED(expr) \
21149  ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
21150 
21151 #endif // GTEST_OS_WINDOWS
21152 
21153 // Macros that execute statement and check that it doesn't generate new fatal
21154 // failures in the current thread.
21155 //
21156 // * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement);
21157 //
21158 // Examples:
21159 //
21160 // EXPECT_NO_FATAL_FAILURE(Process());
21161 // ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed";
21162 //
21163 #define ASSERT_NO_FATAL_FAILURE(statement) \
21164  GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_)
21165 #define EXPECT_NO_FATAL_FAILURE(statement) \
21166  GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_)
21167 
21168 // Causes a trace (including the source file path, the current line
21169 // number, and the given message) to be included in every test failure
21170 // message generated by code in the current scope. The effect is
21171 // undone when the control leaves the current scope.
21172 //
21173 // The message argument can be anything streamable to std::ostream.
21174 //
21175 // In the implementation, we include the current line number as part
21176 // of the dummy variable name, thus allowing multiple SCOPED_TRACE()s
21177 // to appear in the same block - as long as they are on different
21178 // lines.
21179 #define SCOPED_TRACE(message) \
21180  ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\
21181  __FILE__, __LINE__, ::testing::Message() << (message))
21182 
21183 // Compile-time assertion for type equality.
21184 // StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are
21185 // the same type. The value it returns is not interesting.
21186 //
21187 // Instead of making StaticAssertTypeEq a class template, we make it a
21188 // function template that invokes a helper class template. This
21189 // prevents a user from misusing StaticAssertTypeEq<T1, T2> by
21190 // defining objects of that type.
21191 //
21192 // CAVEAT:
21193 //
21194 // When used inside a method of a class template,
21195 // StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is
21196 // instantiated. For example, given:
21197 //
21198 // template <typename T> class Foo {
21199 // public:
21200 // void Bar() { testing::StaticAssertTypeEq<int, T>(); }
21201 // };
21202 //
21203 // the code:
21204 //
21205 // void Test1() { Foo<bool> foo; }
21206 //
21207 // will NOT generate a compiler error, as Foo<bool>::Bar() is never
21208 // actually instantiated. Instead, you need:
21209 //
21210 // void Test2() { Foo<bool> foo; foo.Bar(); }
21211 //
21212 // to cause a compiler error.
21213 template <typename T1, typename T2>
21214 bool StaticAssertTypeEq()
21215 {
21216  (void)internal::StaticAssertTypeEqHelper<T1, T2>();
21217  return true;
21218 }
21219 
21220 // Defines a test.
21221 //
21222 // The first parameter is the name of the test case, and the second
21223 // parameter is the name of the test within the test case.
21224 //
21225 // The convention is to end the test case name with "Test". For
21226 // example, a test case for the Foo class can be named FooTest.
21227 //
21228 // The user should put his test code between braces after using this
21229 // macro. Example:
21230 //
21231 // TEST(FooTest, InitializesCorrectly) {
21232 // Foo foo;
21233 // EXPECT_TRUE(foo.StatusIsOK());
21234 // }
21235 
21236 // Note that we call GetTestTypeId() instead of GetTypeId<
21237 // ::testing::Test>() here to get the type ID of testing::Test. This
21238 // is to work around a suspected linker bug when using Google Test as
21239 // a framework on Mac OS X. The bug causes GetTypeId<
21240 // ::testing::Test>() to return different values depending on whether
21241 // the call is from the Google Test framework itself or from user test
21242 // code. GetTestTypeId() is guaranteed to always return the same
21243 // value, as it always calls GetTypeId<>() from the Google Test
21244 // framework.
21245 #define GTEST_TEST(test_case_name, test_name)\
21246  GTEST_TEST_(test_case_name, test_name, \
21247  ::testing::Test, ::testing::internal::GetTestTypeId())
21248 
21249 // Define this macro to 1 to omit the definition of TEST(), which
21250 // is a generic name and clashes with some other libraries.
21251 #if !GTEST_DONT_DEFINE_TEST
21252 # define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)
21253 #endif
21254 
21255 // Defines a test that uses a test fixture.
21256 //
21257 // The first parameter is the name of the test fixture class, which
21258 // also doubles as the test case name. The second parameter is the
21259 // name of the test within the test case.
21260 //
21261 // A test fixture class must be declared earlier. The user should put
21262 // his test code between braces after using this macro. Example:
21263 //
21264 // class FooTest : public testing::Test {
21265 // protected:
21266 // virtual void SetUp() { b_.AddElement(3); }
21267 //
21268 // Foo a_;
21269 // Foo b_;
21270 // };
21271 //
21272 // TEST_F(FooTest, InitializesCorrectly) {
21273 // EXPECT_TRUE(a_.StatusIsOK());
21274 // }
21275 //
21276 // TEST_F(FooTest, ReturnsElementCountCorrectly) {
21277 // EXPECT_EQ(0, a_.size());
21278 // EXPECT_EQ(1, b_.size());
21279 // }
21280 
21281 #define TEST_F(test_fixture, test_name)\
21282  GTEST_TEST_(test_fixture, test_name, test_fixture, \
21283  ::testing::internal::GetTypeId<test_fixture>())
21284 
21285 } // namespace testing
21286 
21287 // Use this function in main() to run all tests. It returns 0 if all
21288 // tests are successful, or 1 otherwise.
21289 //
21290 // RUN_ALL_TESTS() should be invoked after the command line has been
21291 // parsed by InitGoogleTest().
21292 //
21293 // This function was formerly a macro; thus, it is in the global
21294 // namespace and has an all-caps name.
21296 
21297 inline int RUN_ALL_TESTS()
21298 {
21299  return ::testing::UnitTest::GetInstance()->Run();
21300 }
21301 
21302 #endif // GTEST_INCLUDE_GTEST_GTEST_H_
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) ConstField(const Tuple &t)
static void Print(const T &value,::std::ostream *os)
::std::vector< std::pair< string, GeneratorCreationFunc * > > InstantiationContainer
ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20)
CartesianProductHolder10(const Generator1 &g1, const Generator2 &g2, const Generator3 &g3, const Generator4 &g4, const Generator5 &g5, const Generator6 &g6, const Generator7 &g7, const Generator8 &g8, const Generator9 &g9, const Generator10 &g10)
UnitTestImpl * GetUnitTestImpl()
internal::SetUpTestCaseFunc SetUpTestCaseFunc
::std::tr1::tuple< T1, T2, T3, T4, T5, T6, T7, T8 > ParamType
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) Field(Tuple &t)
ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34)
TypeWithSize< 8 >::Int Int64
bool IsTrue(bool condition)
ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46)
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) Field(Tuple &t)
bool operator==(linked_ptr< U > const &ptr) const
void ReportFailureInUnknownLocation(TestPartResult::Type result_type, const std::string &message)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
std::string GetCapturedStdout()
std::string GetCapturedStderr()
bool operator==(const NativeArray &rhs) const
#define GTEST_DECLARE_bool_(name)
virtual void OnEnvironmentsSetUpEnd(const UnitTest &)
time
Definition: server.py:52
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) ConstField(const Tuple &t)
Iterator(const ParamGeneratorInterface< ParamType > *base, const ParamGenerator< T1 > &g1, const typename ParamGenerator< T1 >::iterator &current1, const ParamGenerator< T2 > &g2, const typename ParamGenerator< T2 >::iterator &current2, const ParamGenerator< T3 > &g3, const typename ParamGenerator< T3 >::iterator &current3, const ParamGenerator< T4 > &g4, const typename ParamGenerator< T4 >::iterator &current4, const ParamGenerator< T5 > &g5, const typename ParamGenerator< T5 >::iterator &current5, const ParamGenerator< T6 > &g6, const typename ParamGenerator< T6 >::iterator &current6, const ParamGenerator< T7 > &g7, const typename ParamGenerator< T7 >::iterator &current7, const ParamGenerator< T8 > &g8, const typename ParamGenerator< T8 >::iterator &current8, const ParamGenerator< T9 > &g9, const typename ParamGenerator< T9 >::iterator &current9)
const T1 const T2 const T3 const T4 const T5 const T6 const T7 & f7
bool param(const std::string &param_name, T &param_val, const T &default_val)
static AssertionResult Compare(const char *expected_expression, const char *actual_expression, Secret *, T *actual)
static bool FullMatch(const ::std::string &str, const RE &re)
ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49, T50 v50)
static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1, const Bits &sam2)
virtual ParamIteratorInterface< ParamType > * Begin() const
virtual const ParamGeneratorInterface< T > * BaseGenerator() const
const T1 const T2 const T3 & f3
#define GTEST_ATTRIBUTE_UNUSED_
#define GTEST_DECLARE_string_(name)
TYPED_TEST_CASE_P(TypeParamTest)
virtual ParamIteratorInterface< ParamType > * End() const
AssertionResult AssertionFailure()
int * count
ROSCPP_DECL void start()
virtual const ParamGeneratorInterface< ParamType > * BaseGenerator() const
const std::vector< TestProperty > & test_properties() const
AssertionResult AssertPred2Helper(const char *pred_text, const char *e1, const char *e2, Pred pred, const T1 &v1, const T2 &v2)
void PrintRawArrayTo(const T a[], size_t count,::std::ostream *os)
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) ConstField(const Tuple &t)
Iterator(const ParamGeneratorInterface< T > *base, T value, int index, IncrementT step)
Environment * AddGlobalTestEnvironment(Environment *env)
virtual const ParamGeneratorInterface< ParamType > * BaseGenerator() const
#define GTEST_CHECK_POSIX_SUCCESS_(posix_call)
f
bool operator==(const ParamIterator &other) const
ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43)
virtual ParamIteratorInterface< ParamType > * Clone() const
internal::EqMatcher< T > Eq(T x)
static void Print(const T &value,::std::ostream *os)
static AssertionResult Compare(const char *expected_expression, const char *actual_expression, BiggestInt expected, BiggestInt actual)
const std::vector< TestInfo * > & test_info_list() const
static bool TestFailed(const TestInfo *test_info)
::std::string PrintToString(const T &value)
TypeWithSize< 4 >::Int Int32
const char Message[]
Definition: strings.h:102
FILE * FOpen(const char *path, const char *mode)
AssertionResult CmpHelperFloatingPointEQ(const char *expected_expression, const char *actual_expression, RawType expected, RawType actual)
virtual bool Equals(const ParamIteratorInterface< ParamType > &other) const
static bool TestReportableDisabled(const TestInfo *test_info)
const internal::UnitTestImpl * impl() const
CartesianProductHolder8(const Generator1 &g1, const Generator2 &g2, const Generator3 &g3, const Generator4 &g4, const Generator5 &g5, const Generator6 &g6, const Generator7 &g7, const Generator8 &g8)
Derived * CheckedDowncastToActualType(Base *base)
static void Print(const T(&value)[N],::std::ostream *os)
static void ClearTestResult(TestInfo *test_info)
::std::tr1::tuple< T1, T2, T3, T4, T5, T6 > ParamType
virtual ParamIteratorInterface< ParamType > * Clone() const
TYPED_TEST_P(TypeParamTest, TestA)
void UniversalTersePrint(const T &value,::std::ostream *os)
bool BoolFromGTestEnv(const char *flag, bool default_value)
virtual ParamIteratorInterface< ParamType > * End() const
const std::vector< TestPartResult > & test_part_results() const
ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21)
Iterator(const ParamGeneratorInterface< ParamType > *base, const ParamGenerator< T1 > &g1, const typename ParamGenerator< T1 >::iterator &current1, const ParamGenerator< T2 > &g2, const typename ParamGenerator< T2 >::iterator &current2, const ParamGenerator< T3 > &g3, const typename ParamGenerator< T3 >::iterator &current3, const ParamGenerator< T4 > &g4, const typename ParamGenerator< T4 >::iterator &current4, const ParamGenerator< T5 > &g5, const typename ParamGenerator< T5 >::iterator &current5, const ParamGenerator< T6 > &g6, const typename ParamGenerator< T6 >::iterator &current6)
GTEST_API_ int g_init_gtest_count
GTEST_API_::std::string FormatFileLocation(const char *file, int line)
ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30)
AssertionResult CmpHelperSTRCASENE(const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
TypeWithSize< 4 >::UInt UInt32
ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17)
Definition: test.py:1
CartesianProductGenerator5(const ParamGenerator< T1 > &g1, const ParamGenerator< T2 > &g2, const ParamGenerator< T3 > &g3, const ParamGenerator< T4 > &g4, const ParamGenerator< T5 > &g5)
ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28)
ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27)
XmlRpcServer s
ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48)
#define GTEST_DECLARE_int32_(name)
void DefaultPrintNonContainerTo(const T &value,::std::ostream *os)
static AssertionResult Compare(const char *expected_expression, const char *actual_expression, const T1 &expected, const T2 &actual, typename EnableIf< !is_pointer< T2 >::value >::type *=0)
bool ParseInt32(const Message &src_text, const char *str, Int32 *value)
std::vector< TestInfo * > & test_info_list()
#define GTEST_DISALLOW_ASSIGN_(type)
const T1 const T2 const T3 const T4 const T5 const T6 const T7 const T8 const T9 & f9
std::string StringStreamToString(::std::stringstream *ss)
CartesianProductGenerator9(const ParamGenerator< T1 > &g1, const ParamGenerator< T2 > &g2, const ParamGenerator< T3 > &g3, const ParamGenerator< T4 > &g4, const ParamGenerator< T5 > &g5, const ParamGenerator< T6 > &g6, const ParamGenerator< T7 > &g7, const ParamGenerator< T8 > &g8, const ParamGenerator< T9 > &g9)
virtual const ParamGeneratorInterface< ParamType > * BaseGenerator() const
FILE * FReopen(const char *path, const char *mode, FILE *stream)
void set_elapsed_time(TimeInMillis elapsed)
int Stat(const char *path, StatStruct *buf)
static void Print(const T(&a)[N],::std::ostream *os)
#define GTEST_IMPL_CMP_HELPER_(op_name, op)
virtual ParamIteratorInterface< ParamType > * End() const
TestEventListener * default_xml_generator() const
AssertionResult DoubleNearPredFormat(const char *expr1, const char *expr2, const char *abs_error_expr, double val1, double val2, double abs_error)
virtual void OnTestPartResult(const TestPartResult &)
bool SkipPrefix(const char *prefix, const char **pstr)
static void SetParam(const ParamType *parameter)
CartesianProductHolder5(const Generator1 &g1, const Generator2 &g2, const Generator3 &g3, const Generator4 &g4, const Generator5 &g5)
TypeWithSize< 8 >::UInt UInt64
ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24)
ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49)
virtual ParamIteratorInterface< ParamType > * Clone() const
scoped_ptr< ParamIteratorInterface< T > > impl_
GTEST_DECLARE_TUPLE_AS_FRIEND_ tuple & CopyFrom(const GTEST_10_TUPLE_(U)&t)
REGISTER_TYPED_TEST_CASE_P(TypeParamTest, TestA, TestB)
virtual const ParamGeneratorInterface< ParamType > * BaseGenerator() const
virtual ParamIteratorInterface< T > * End() const
internal::TearDownTestCaseFunc TearDownTestCaseFunc
static void Print(const T &value,::std::ostream *os)
void PrintStringTo(const ::std::string &s, ostream *os)
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) ConstField(const Tuple &t)
TestPartResult(Type a_type, const char *a_file_name, int a_line_number, const char *a_message)
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) ConstField(const Tuple &t)
TestInfo * MakeAndRegisterTestInfo(const char *test_case_name, const char *name, const char *type_param, const char *value_param, TypeId fixture_class_id, SetUpTestCaseFunc set_up_tc, TearDownTestCaseFunc tear_down_tc, TestFactoryBase *factory)
std::string FormatForComparisonFailureMessage(const T1 &value, const T2 &)
ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5)
ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39)
name
Definition: setup.py:38
static bool PartialMatch(const ::std::string &str, const RE &re)
#define EXPECT_TRUE(condition)
virtual bool Equals(const ParamIteratorInterface< T > &other) const
ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)
ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13)
virtual ParamIteratorInterface< ParamType > * Clone() const
FilePath & operator=(const FilePath &rhs)
TYPED_TEST_CASE(TypedTest, MyTypes)
static void TersePrintPrefixToStrings(const Tuple &t, Strings *strings)
void ReportInvalidTestCaseType(const char *test_case_name, const char *file, int line)
ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36)
int AddTestCaseInstantiation(const string &instantiation_name, GeneratorCreationFunc *func, const char *, int)
virtual void OnEnvironmentsTearDownEnd(const UnitTest &)
internal::ParamGenerator< typename::testing::internal::IteratorTraits< ForwardIterator >::value_type > ValuesIn(ForwardIterator begin, ForwardIterator end)
virtual bool Equals(const ParamIteratorInterface< ParamType > &other) const
ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32)
virtual ParamIteratorInterface< ParamType > * Begin() const
static void TersePrintPrefixToStrings(const Tuple &, Strings *)
bool_constant< true > true_type
std::string StreamableToString(const T &streamable)
virtual ParamIteratorInterface< ParamType > * End() const
virtual const ParamGeneratorInterface< T > * BaseGenerator() const
void AppendMessage(const Message &a_message)
INSTANTIATE_TYPED_TEST_CASE_P(My, TypeParamTest, MyTypes)
void SetValue(const std::string &new_value)
ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44)
virtual ParamIteratorInterface< ParamType > * Begin() const
const T1 const T2 const T3 const T4 & f4
#define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator)
static void PrintValue(const T &value,::std::ostream *os)
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) ConstField(const Tuple &t)
bool ArrayEq(const T *lhs, size_t size, const U *rhs)
bool write(ros_opcua_srvs::Write::Request &req, ros_opcua_srvs::Write::Response &res)
virtual bool Equals(const ParamIteratorInterface< ParamType > &other) const
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) Field(Tuple &t)
const char * StringFromGTestEnv(const char *flag, const char *default_value)
int Write(int fd, const void *buf, unsigned int count)
void PrintBytesInObjectTo(const unsigned char *obj_bytes, size_t count, ostream *os)
virtual ParamIteratorInterface< ParamType > * Clone() const
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) ConstField(const Tuple &t)
AssertionResult CmpHelperEQ(const char *expected_expression, const char *actual_expression, BiggestInt expected, BiggestInt actual)
static void PrintPrefixTo(const Tuple &,::std::ostream *)
ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6)
virtual const ParamGeneratorInterface< ParamType > * BaseGenerator() const
static int CalculateEndIndex(const T &begin, const T &end, const IncrementT &step)
virtual Setup_should_be_spelled_SetUp * Setup()
linked_ptr< T > make_linked_ptr(T *ptr)
#define GTEST_TUPLE_ELEMENT_(k, Tuple)
ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38)
virtual bool Equals(const ParamIteratorInterface< ParamType > &other) const
GTEST_10_TUPLE_(T) make_tuple(const T0 &f0
ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29)
const T1 const T2 const T3 const T4 const T5 const T6 & f6
void join(linked_ptr_internal const *ptr) GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex)
AssertionResult AssertionSuccess()
virtual ParamIteratorInterface< T > * Begin() const
message
Definition: server.py:50
virtual bool Equals(const ParamIteratorInterface< ParamType > &other) const
#define GTEST_DECLARE_TUPLE_AS_FRIEND_
virtual ParamIteratorInterface< ParamType > * End() const
AssertionResult & operator<<(const T &value)
bool operator!=(linked_ptr< U > const &ptr) const
#define TEST_F(test_fixture, test_name)
ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33)
static bool TestPassed(const TestInfo *test_info)
virtual ParamIteratorInterface< ParamType > * Begin() const
CartesianProductHolder9(const Generator1 &g1, const Generator2 &g2, const Generator3 &g3, const Generator4 &g4, const Generator5 &g5, const Generator6 &g6, const Generator7 &g7, const Generator8 &g8, const Generator9 &g9)
TestInfo(const char *a_test_case_base_name, const char *a_test_base_name, TestMetaFactoryBase< ParamType > *a_test_meta_factory)
linked_ptr< const ParamGeneratorInterface< T > > impl_
internal::CartesianProductHolder2< Generator1, Generator2 > Combine(const Generator1 &g1, const Generator2 &g2)
std::string GetCurrentOsStackTraceExceptTop(UnitTest *, int skip_count)
GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) get(const GTEST_10_TUPLE_(T)&t)
int Read(int fd, void *buf, unsigned int count)
ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26)
bool CaseInsensitiveCStringEquals(const char *lhs, const char *rhs)
linked_ptr & operator=(linked_ptr< U > const &ptr)
ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11)
virtual ParamIteratorInterface< ParamType > * Clone() const
virtual ParamIteratorInterface< ParamType > * Begin() const
virtual ParamIteratorInterface< ParamType > * End() const
::std::tr1::tuple< T1, T2, T3, T4, T5, T6, T7 > ParamType
tuple & operator=(const tuple &t)
void UniversalPrint(const T &value,::std::ostream *os)
bool AlmostEquals(const FloatingPoint &rhs) const
bool operator==(const GTEST_10_TUPLE_(T)&t, const GTEST_10_TUPLE_(U)&u)
virtual ParamIteratorInterface< ParamType > * Begin() const
ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25)
virtual ParamIteratorInterface< ParamType > * Clone() const
ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16)
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) ConstField(const Tuple &t)
::std::tr1::tuple< T1, T2, T3, T4, T5, T6, T7, T8, T9 > ParamType
virtual ParamIteratorInterface< ParamType > * Clone() const
int StrCaseCmp(const char *s1, const char *s2)
virtual Setup_should_be_spelled_SetUp * Setup()
void Init(const Element *array, size_t a_size, RelationToSource relation)
CartesianProductGenerator7(const ParamGenerator< T1 > &g1, const ParamGenerator< T2 > &g2, const ParamGenerator< T3 > &g3, const ParamGenerator< T4 > &g4, const ParamGenerator< T5 > &g5, const ParamGenerator< T6 > &g6, const ParamGenerator< T7 > &g7)
CartesianProductGenerator10(const ParamGenerator< T1 > &g1, const ParamGenerator< T2 > &g2, const ParamGenerator< T3 > &g3, const ParamGenerator< T4 > &g4, const ParamGenerator< T5 > &g5, const ParamGenerator< T6 > &g6, const ParamGenerator< T7 > &g7, const ParamGenerator< T8 > &g8, const ParamGenerator< T9 > &g9, const ParamGenerator< T10 > &g10)
bool depart() GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex)
bool operator!=(const ParamIterator &other) const
#define GTEST_MUST_USE_RESULT_
virtual void OnTestIterationStart(const UnitTest &, int)
#define GTEST_DECLARE_STATIC_MUTEX_(mutex)
void operator<<(const testing::internal::Secret &, int)
virtual bool Equals(const ParamIteratorInterface< ParamType > &other) const
virtual ParamIteratorInterface< ParamType > * End() const
bool read(ros_opcua_srvs::Read::Request &req, ros_opcua_srvs::Read::Response &res)
PolymorphicMatcher< internal::FieldMatcher< Class, FieldType > > Field(FieldType Class::*field, const FieldMatcher &matcher)
const char * StrNCpy(char *dest, const char *src, size_t n)
std::string GetString() const
#define GTEST_LOCK_EXCLUDED_(locks)
bool IsDir(const StatStruct &st)
AssertionResult IsSubstring(const char *needle_expr, const char *haystack_expr, const char *needle, const char *haystack)
tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7, GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9)
ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12)
Iterator(const ParamGeneratorInterface< ParamType > *base, const ParamGenerator< T1 > &g1, const typename ParamGenerator< T1 >::iterator &current1, const ParamGenerator< T2 > &g2, const typename ParamGenerator< T2 >::iterator &current2, const ParamGenerator< T3 > &g3, const typename ParamGenerator< T3 >::iterator &current3, const ParamGenerator< T4 > &g4, const typename ParamGenerator< T4 >::iterator &current4, const ParamGenerator< T5 > &g5, const typename ParamGenerator< T5 >::iterator &current5, const ParamGenerator< T6 > &g6, const typename ParamGenerator< T6 >::iterator &current6, const ParamGenerator< T7 > &g7, const typename ParamGenerator< T7 >::iterator &current7)
testing::Types< VeryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName, int *, MyArray< bool, 42 > > MyTypes
AssertionResult CmpHelperSTRCASEEQ(const char *expected_expression, const char *actual_expression, const char *expected, const char *actual)
const T1 const T2 const T3 const T4 const T5 const T6 const T7 const T8 & f8
virtual bool Equals(const ParamIteratorInterface< ParamType > &other) const
AssertHelperData(TestPartResult::Type t, const char *srcfile, int line_num, const char *msg)
CartesianProductHolder7(const Generator1 &g1, const Generator2 &g2, const Generator3 &g3, const Generator4 &g4, const Generator5 &g5, const Generator6 &g6, const Generator7 &g7)
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) Field(Tuple &t)
Iterator(const ParamGeneratorInterface< ParamType > *base, const ParamGenerator< T1 > &g1, const typename ParamGenerator< T1 >::iterator &current1, const ParamGenerator< T2 > &g2, const typename ParamGenerator< T2 >::iterator &current2, const ParamGenerator< T3 > &g3, const typename ParamGenerator< T3 >::iterator &current3, const ParamGenerator< T4 > &g4, const typename ParamGenerator< T4 >::iterator &current4, const ParamGenerator< T5 > &g5, const typename ParamGenerator< T5 >::iterator &current5, const ParamGenerator< T6 > &g6, const typename ParamGenerator< T6 >::iterator &current6, const ParamGenerator< T7 > &g7, const typename ParamGenerator< T7 >::iterator &current7, const ParamGenerator< T8 > &g8, const typename ParamGenerator< T8 >::iterator &current8)
CartesianProductHolder6(const Generator1 &g1, const Generator2 &g2, const Generator3 &g3, const Generator4 &g4, const Generator5 &g5, const Generator6 &g6)
static void PrintPrefixTo(const Tuple &t,::std::ostream *os)
static void PrintPrefixTo(const Tuple &t,::std::ostream *os)
const char Types[]
Definition: strings.h:198
CartesianProductHolder2(const Generator1 &g1, const Generator2 &g2)
GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) get(GTEST_10_TUPLE_(T)&t)
CartesianProductGenerator4(const ParamGenerator< T1 > &g1, const ParamGenerator< T2 > &g2, const ParamGenerator< T3 > &g3, const ParamGenerator< T4 > &g4)
GTEST_API_::std::string FormatCompilerIndependentFileLocation(const char *file, int line)
AssertionResult CmpHelperSTRNE(const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
const TestResult & ad_hoc_test_result() const
const char kStackTraceMarker[]
ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35)
FILE * FDOpen(int fd, const char *mode)
wchar_t type_
Definition: format.cc:302
virtual void OnEnvironmentsTearDownStart(const UnitTest &)
CartesianProductGenerator6(const ParamGenerator< T1 > &g1, const ParamGenerator< T2 > &g2, const ParamGenerator< T3 > &g3, const ParamGenerator< T4 > &g4, const ParamGenerator< T5 > &g5, const ParamGenerator< T6 > &g6)
std::string AppendUserMessage(const std::string &gtest_msg, const Message &user_msg)
ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8)
#define GTEST_CHECK_(condition)
AssertionResult & operator<<(::std::ostream &(*basic_manipulator)(::std::ostream &stream))
void AddTestPattern(const char *test_case_name, const char *test_base_name, TestMetaFactoryBase< ParamType > *meta_factory)
ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14)
ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, T42 v42)
Strings UniversalTersePrintTupleFieldsToStrings(const Tuple &value)
ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19)
internal::UnitTestImpl * impl()
ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47)
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9)
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) Field(Tuple &t)
ParamIterator(ParamIteratorInterface< T > *impl)
static void ClearTestCaseResult(TestCase *test_case)
virtual const ParamGeneratorInterface< T > * BaseGenerator() const =0
void UniversalPrintArray(const char *begin, size_t len, ostream *os)
virtual TestFactoryBase * CreateTestFactory(ParamType parameter)
static bool TestDisabled(const TestInfo *test_info)
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) Field(Tuple &t)
Iterator(const ParamGeneratorInterface< ParamType > *base, const ParamGenerator< T1 > &g1, const typename ParamGenerator< T1 >::iterator &current1, const ParamGenerator< T2 > &g2, const typename ParamGenerator< T2 >::iterator &current2, const ParamGenerator< T3 > &g3, const typename ParamGenerator< T3 >::iterator &current3, const ParamGenerator< T4 > &g4, const typename ParamGenerator< T4 >::iterator &current4, const ParamGenerator< T5 > &g5, const typename ParamGenerator< T5 >::iterator &current5)
AssertionResult EqFailure(const char *expected_expression, const char *actual_expression, const std::string &expected_value, const std::string &actual_value, bool ignoring_case)
#define TEST_P(test_case_name, test_name)
virtual bool Equals(const ParamIteratorInterface< T > &other) const
virtual const ParamGeneratorInterface< ParamType > * BaseGenerator() const
TYPED_TEST(TypedTest, TestA)
TestProperty(const std::string &a_key, const std::string &a_value)
static bool TestReportable(const TestInfo *test_info)
CartesianProductGenerator8(const ParamGenerator< T1 > &g1, const ParamGenerator< T2 > &g2, const ParamGenerator< T3 > &g3, const ParamGenerator< T4 > &g4, const ParamGenerator< T5 > &g5, const ParamGenerator< T6 > &g6, const ParamGenerator< T7 > &g7, const ParamGenerator< T8 > &g8)
virtual void OnTestIterationEnd(const UnitTest &, int)
std::string GetBoolAssertionFailureMessage(const AssertionResult &assertion_result, const char *expression_text, const char *actual_predicate_value, const char *expected_predicate_value)
::std::tr1::tuple< long, int > Tuple2
ParamGenerator & operator=(const ParamGenerator &other)
::std::vector< string > Strings
TypeWithSize< sizeof(RawType)>::UInt Bits
internal::ParamGenerator< bool > Bool()
virtual bool Equals(const ParamIteratorInterface< ParamType > &other) const
virtual const ParamGeneratorInterface< ParamType > * BaseGenerator() const
bool_constant< false > false_type
const T1 const T2 const T3 const T4 const T5 & f5
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) Field(Tuple &t)
::std::vector< ParameterizedTestCaseInfoBase * > TestCaseInfoContainer
virtual void OnEnvironmentsSetUpStart(const UnitTest &)
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) ConstField(const Tuple &t)
void PrintTupleTo(const T &t,::std::ostream *os)
void PrintWideStringTo(const ::std::wstring &s, ostream *os)
bool operator!=(const GTEST_10_TUPLE_(T)&t, const GTEST_10_TUPLE_(U)&u)
AssertionResult DoubleLE(const char *expr1, const char *expr2, double val1, double val2)
virtual ParamIteratorInterface< T > * Clone() const
void InitGoogleTest(int *argc, char **argv)
ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40)
Int32 Int32FromGTestEnv(const char *flag, Int32 default_value)
ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22)
Iterator(const ParamGeneratorInterface< T > *base, typename ContainerType::const_iterator iterator)
tuple & operator=(const GTEST_10_TUPLE_(U)&t)
FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args)
Definition: format.cc:891
ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31)
Iterator(const ParamGeneratorInterface< ParamType > *base, const ParamGenerator< T1 > &g1, const typename ParamGenerator< T1 >::iterator &current1, const ParamGenerator< T2 > &g2, const typename ParamGenerator< T2 >::iterator &current2, const ParamGenerator< T3 > &g3, const typename ParamGenerator< T3 >::iterator &current3)
const TestResult * result() const
void CopyArray(const T *from, size_t size, U *to)
AssertionResult AssertPred1Helper(const char *pred_text, const char *e1, Pred pred, const T1 &v1)
AssertionResult IsNotSubstring(const char *needle_expr, const char *haystack_expr, const char *needle, const char *haystack)
::std::tr1::tuple< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > ParamType
#define GTEST_REMOVE_REFERENCE_AND_CONST_(T)
ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37)
TestEventListener * default_result_printer() const
#define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType)
ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23)
virtual ParamIteratorInterface< ParamType > * End() const
AssertionResult CmpHelperSTREQ(const char *expected_expression, const char *actual_expression, const char *expected, const char *actual)
Iterator(const ParamGeneratorInterface< ParamType > *base, const ParamGenerator< T1 > &g1, const typename ParamGenerator< T1 >::iterator &current1, const ParamGenerator< T2 > &g2, const typename ParamGenerator< T2 >::iterator &current2)
virtual ParamIteratorInterface * Clone() const =0
Iterator(const ParamGeneratorInterface< ParamType > *base, const ParamGenerator< T1 > &g1, const typename ParamGenerator< T1 >::iterator &current1, const ParamGenerator< T2 > &g2, const typename ParamGenerator< T2 >::iterator &current2, const ParamGenerator< T3 > &g3, const typename ParamGenerator< T3 >::iterator &current3, const ParamGenerator< T4 > &g4, const typename ParamGenerator< T4 >::iterator &current4)
internal::ValueArray1< T1 > Values(T1 v1)
ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45)
Iter ArrayAwareFind(Iter begin, Iter end, const Element &elem)
ParamGenerator(ParamGeneratorInterface< T > *impl)
virtual ParamIteratorInterface< ParamType > * Begin() const
AssertionResult AssertPred5Helper(const char *pred_text, const char *e1, const char *e2, const char *e3, const char *e4, const char *e5, Pred pred, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5)
static void Print(const T &value,::std::ostream *os)
ParameterizedTestCaseInfo< TestCase > * GetTestCasePatternHolder(const char *test_case_name, const char *file, int line)
TypeWithSize< 8 >::Int TimeInMillis
virtual bool Equals(const ParamIteratorInterface< ParamType > &other) const
ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7)
virtual const ParamGeneratorInterface< ParamType > * BaseGenerator() const
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) Field(Tuple &t)
const T1 const T2 & f2
static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) ConstField(const Tuple &t)
const char * GetEnv(const char *name)
char IsNullLiteralHelper(Secret *p)
ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10)
ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41)
AssertionResult AssertPred3Helper(const char *pred_text, const char *e1, const char *e2, const char *e3, Pred pred, const T1 &v1, const T2 &v2, const T3 &v3)
CartesianProductHolder4(const Generator1 &g1, const Generator2 &g2, const Generator3 &g3, const Generator4 &g4)
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) Field(Tuple &t)
IsContainer IsContainerTest(int, typename C::iterator *=NULL, typename C::const_iterator *=NULL)
virtual ParamIteratorInterface< ParamType > * Begin() const
virtual ParamIteratorInterface< ParamType > * Begin() const
virtual const ParamGeneratorInterface< ParamType > * BaseGenerator() const
static bool ShouldRunTest(const TestInfo *test_info)
ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15)
AssertionResult AssertPred4Helper(const char *pred_text, const char *e1, const char *e2, const char *e3, const char *e4, Pred pred, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4)
linked_ptr & operator=(linked_ptr const &ptr)
static AssertionResult Compare(const char *expected_expression, const char *actual_expression, const T1 &expected, const T2 &actual)
Iterator(const ParamGeneratorInterface< ParamType > *base, const ParamGenerator< T1 > &g1, const typename ParamGenerator< T1 >::iterator &current1, const ParamGenerator< T2 > &g2, const typename ParamGenerator< T2 >::iterator &current2, const ParamGenerator< T3 > &g3, const typename ParamGenerator< T3 >::iterator &current3, const ParamGenerator< T4 > &g4, const typename ParamGenerator< T4 >::iterator &current4, const ParamGenerator< T5 > &g5, const typename ParamGenerator< T5 >::iterator &current5, const ParamGenerator< T6 > &g6, const typename ParamGenerator< T6 >::iterator &current6, const ParamGenerator< T7 > &g7, const typename ParamGenerator< T7 >::iterator &current7, const ParamGenerator< T8 > &g8, const typename ParamGenerator< T8 >::iterator &current8, const ParamGenerator< T9 > &g9, const typename ParamGenerator< T9 >::iterator &current9, const ParamGenerator< T10 > &g10, const typename ParamGenerator< T10 >::iterator &current10)
static void TersePrintPrefixToStrings(const Tuple &t, Strings *strings)
NativeArray(const Element *array, size_t count, RelationToSource relation)
tuple(const GTEST_10_TUPLE_(U)&t)
CartesianProductHolder3(const Generator1 &g1, const Generator2 &g2, const Generator3 &g3)
void PrintTo(const ReferenceWrapper< T > &ref,::std::ostream *os)
std::string name_
virtual ParamIteratorInterface< ParamType > * Clone() const
virtual ParamIteratorInterface< ParamType > * End() const
ParamIterator & operator=(const ParamIterator &other)
ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18)
CartesianProductGenerator3(const ParamGenerator< T1 > &g1, const ParamGenerator< T2 > &g2, const ParamGenerator< T3 > &g3)
CartesianProductGenerator2(const ParamGenerator< T1 > &g1, const ParamGenerator< T2 > &g2)
void DefaultPrintTo(IsContainer, false_type, const C &container,::std::ostream *os)
AssertionResult FloatLE(const char *expr1, const char *expr2, float val1, float val2)
#define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType)
static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) Field(Tuple &t)


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:12:00