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

Side by Side Diff: sky/engine/wtf/TypeTraits.cpp

Issue 719063002: Revert "Remove support for MSVC" (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 20 matching lines...) Expand all
31 COMPILE_ASSERT(IsInteger<signed char>::value, WTF_IsInteger_signed_char_true); 31 COMPILE_ASSERT(IsInteger<signed char>::value, WTF_IsInteger_signed_char_true);
32 COMPILE_ASSERT(IsInteger<unsigned char>::value, WTF_IsInteger_unsigned_char_true ); 32 COMPILE_ASSERT(IsInteger<unsigned char>::value, WTF_IsInteger_unsigned_char_true );
33 COMPILE_ASSERT(IsInteger<short>::value, WTF_IsInteger_short_true); 33 COMPILE_ASSERT(IsInteger<short>::value, WTF_IsInteger_short_true);
34 COMPILE_ASSERT(IsInteger<unsigned short>::value, WTF_IsInteger_unsigned_short_tr ue); 34 COMPILE_ASSERT(IsInteger<unsigned short>::value, WTF_IsInteger_unsigned_short_tr ue);
35 COMPILE_ASSERT(IsInteger<int>::value, WTF_IsInteger_int_true); 35 COMPILE_ASSERT(IsInteger<int>::value, WTF_IsInteger_int_true);
36 COMPILE_ASSERT(IsInteger<unsigned>::value, WTF_IsInteger_unsigned_int_true); 36 COMPILE_ASSERT(IsInteger<unsigned>::value, WTF_IsInteger_unsigned_int_true);
37 COMPILE_ASSERT(IsInteger<long>::value, WTF_IsInteger_long_true); 37 COMPILE_ASSERT(IsInteger<long>::value, WTF_IsInteger_long_true);
38 COMPILE_ASSERT(IsInteger<unsigned long>::value, WTF_IsInteger_unsigned_long_true ); 38 COMPILE_ASSERT(IsInteger<unsigned long>::value, WTF_IsInteger_unsigned_long_true );
39 COMPILE_ASSERT(IsInteger<long long>::value, WTF_IsInteger_long_long_true); 39 COMPILE_ASSERT(IsInteger<long long>::value, WTF_IsInteger_long_long_true);
40 COMPILE_ASSERT(IsInteger<unsigned long long>::value, WTF_IsInteger_unsigned_long _long_true); 40 COMPILE_ASSERT(IsInteger<unsigned long long>::value, WTF_IsInteger_unsigned_long _long_true);
41 #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
41 COMPILE_ASSERT(IsInteger<wchar_t>::value, WTF_IsInteger_wchar_t_true); 42 COMPILE_ASSERT(IsInteger<wchar_t>::value, WTF_IsInteger_wchar_t_true);
43 #endif
42 COMPILE_ASSERT(!IsInteger<char*>::value, WTF_IsInteger_char_pointer_false); 44 COMPILE_ASSERT(!IsInteger<char*>::value, WTF_IsInteger_char_pointer_false);
43 COMPILE_ASSERT(!IsInteger<const char*>::value, WTF_IsInteger_const_char_pointer_ false); 45 COMPILE_ASSERT(!IsInteger<const char*>::value, WTF_IsInteger_const_char_pointer_ false);
44 COMPILE_ASSERT(!IsInteger<volatile char*>::value, WTF_IsInteger_volatile_char_po inter_false); 46 COMPILE_ASSERT(!IsInteger<volatile char*>::value, WTF_IsInteger_volatile_char_po inter_false);
45 COMPILE_ASSERT(!IsInteger<double>::value, WTF_IsInteger_double_false); 47 COMPILE_ASSERT(!IsInteger<double>::value, WTF_IsInteger_double_false);
46 COMPILE_ASSERT(!IsInteger<float>::value, WTF_IsInteger_float_false); 48 COMPILE_ASSERT(!IsInteger<float>::value, WTF_IsInteger_float_false);
47 49
48 COMPILE_ASSERT(IsFloatingPoint<float>::value, WTF_IsFloatingPoint_float_true); 50 COMPILE_ASSERT(IsFloatingPoint<float>::value, WTF_IsFloatingPoint_float_true);
49 COMPILE_ASSERT(IsFloatingPoint<double>::value, WTF_IsFloatingPoint_double_true); 51 COMPILE_ASSERT(IsFloatingPoint<double>::value, WTF_IsFloatingPoint_double_true);
50 COMPILE_ASSERT(IsFloatingPoint<long double>::value, WTF_IsFloatingPoint_long_dou ble_true); 52 COMPILE_ASSERT(IsFloatingPoint<long double>::value, WTF_IsFloatingPoint_long_dou ble_true);
51 COMPILE_ASSERT(!IsFloatingPoint<int>::value, WTF_IsFloatingPoint_int_false); 53 COMPILE_ASSERT(!IsFloatingPoint<int>::value, WTF_IsFloatingPoint_int_false);
52 54
53 COMPILE_ASSERT(IsPod<bool>::value, WTF_IsPod_bool_true); 55 COMPILE_ASSERT(IsPod<bool>::value, WTF_IsPod_bool_true);
54 COMPILE_ASSERT(IsPod<char>::value, WTF_IsPod_char_true); 56 COMPILE_ASSERT(IsPod<char>::value, WTF_IsPod_char_true);
55 COMPILE_ASSERT(IsPod<signed char>::value, WTF_IsPod_signed_char_true); 57 COMPILE_ASSERT(IsPod<signed char>::value, WTF_IsPod_signed_char_true);
56 COMPILE_ASSERT(IsPod<unsigned char>::value, WTF_IsPod_unsigned_char_true); 58 COMPILE_ASSERT(IsPod<unsigned char>::value, WTF_IsPod_unsigned_char_true);
57 COMPILE_ASSERT(IsPod<short>::value, WTF_IsPod_short_true); 59 COMPILE_ASSERT(IsPod<short>::value, WTF_IsPod_short_true);
58 COMPILE_ASSERT(IsPod<unsigned short>::value, WTF_IsPod_unsigned_short_true); 60 COMPILE_ASSERT(IsPod<unsigned short>::value, WTF_IsPod_unsigned_short_true);
59 COMPILE_ASSERT(IsPod<int>::value, WTF_IsPod_int_true); 61 COMPILE_ASSERT(IsPod<int>::value, WTF_IsPod_int_true);
60 COMPILE_ASSERT(IsPod<unsigned>::value, WTF_IsPod_unsigned_int_true); 62 COMPILE_ASSERT(IsPod<unsigned>::value, WTF_IsPod_unsigned_int_true);
61 COMPILE_ASSERT(IsPod<long>::value, WTF_IsPod_long_true); 63 COMPILE_ASSERT(IsPod<long>::value, WTF_IsPod_long_true);
62 COMPILE_ASSERT(IsPod<unsigned long>::value, WTF_IsPod_unsigned_long_true); 64 COMPILE_ASSERT(IsPod<unsigned long>::value, WTF_IsPod_unsigned_long_true);
63 COMPILE_ASSERT(IsPod<long long>::value, WTF_IsPod_long_long_true); 65 COMPILE_ASSERT(IsPod<long long>::value, WTF_IsPod_long_long_true);
64 COMPILE_ASSERT(IsPod<unsigned long long>::value, WTF_IsPod_unsigned_long_long_tr ue); 66 COMPILE_ASSERT(IsPod<unsigned long long>::value, WTF_IsPod_unsigned_long_long_tr ue);
67 #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
65 COMPILE_ASSERT(IsPod<wchar_t>::value, WTF_IsPod_wchar_t_true); 68 COMPILE_ASSERT(IsPod<wchar_t>::value, WTF_IsPod_wchar_t_true);
69 #endif
66 COMPILE_ASSERT(IsPod<char*>::value, WTF_IsPod_char_pointer_true); 70 COMPILE_ASSERT(IsPod<char*>::value, WTF_IsPod_char_pointer_true);
67 COMPILE_ASSERT(IsPod<const char*>::value, WTF_IsPod_const_char_pointer_true); 71 COMPILE_ASSERT(IsPod<const char*>::value, WTF_IsPod_const_char_pointer_true);
68 COMPILE_ASSERT(IsPod<volatile char*>::value, WTF_IsPod_volatile_char_pointer_tru e); 72 COMPILE_ASSERT(IsPod<volatile char*>::value, WTF_IsPod_volatile_char_pointer_tru e);
69 COMPILE_ASSERT(IsPod<double>::value, WTF_IsPod_double_true); 73 COMPILE_ASSERT(IsPod<double>::value, WTF_IsPod_double_true);
70 COMPILE_ASSERT(IsPod<long double>::value, WTF_IsPod_long_double_true); 74 COMPILE_ASSERT(IsPod<long double>::value, WTF_IsPod_long_double_true);
71 COMPILE_ASSERT(IsPod<float>::value, WTF_IsPod_float_true); 75 COMPILE_ASSERT(IsPod<float>::value, WTF_IsPod_float_true);
72 COMPILE_ASSERT(!IsPod<IsPod<bool> >::value, WTF_IsPod_struct_false); 76 COMPILE_ASSERT(!IsPod<IsPod<bool> >::value, WTF_IsPod_struct_false);
73 77
74 enum IsConvertibleToIntegerCheck { }; 78 enum IsConvertibleToIntegerCheck { };
75 COMPILE_ASSERT(IsConvertibleToInteger<IsConvertibleToIntegerCheck>::value, WTF_I sConvertibleToInteger_enum_true); 79 COMPILE_ASSERT(IsConvertibleToInteger<IsConvertibleToIntegerCheck>::value, WTF_I sConvertibleToInteger_enum_true);
76 COMPILE_ASSERT(IsConvertibleToInteger<bool>::value, WTF_IsConvertibleToInteger_b ool_true); 80 COMPILE_ASSERT(IsConvertibleToInteger<bool>::value, WTF_IsConvertibleToInteger_b ool_true);
77 COMPILE_ASSERT(IsConvertibleToInteger<char>::value, WTF_IsConvertibleToInteger_c har_true); 81 COMPILE_ASSERT(IsConvertibleToInteger<char>::value, WTF_IsConvertibleToInteger_c har_true);
78 COMPILE_ASSERT(IsConvertibleToInteger<signed char>::value, WTF_IsConvertibleToIn teger_signed_char_true); 82 COMPILE_ASSERT(IsConvertibleToInteger<signed char>::value, WTF_IsConvertibleToIn teger_signed_char_true);
79 COMPILE_ASSERT(IsConvertibleToInteger<unsigned char>::value, WTF_IsConvertibleTo Integer_unsigned_char_true); 83 COMPILE_ASSERT(IsConvertibleToInteger<unsigned char>::value, WTF_IsConvertibleTo Integer_unsigned_char_true);
80 COMPILE_ASSERT(IsConvertibleToInteger<short>::value, WTF_IsConvertibleToInteger_ short_true); 84 COMPILE_ASSERT(IsConvertibleToInteger<short>::value, WTF_IsConvertibleToInteger_ short_true);
81 COMPILE_ASSERT(IsConvertibleToInteger<unsigned short>::value, WTF_IsConvertibleT oInteger_unsigned_short_true); 85 COMPILE_ASSERT(IsConvertibleToInteger<unsigned short>::value, WTF_IsConvertibleT oInteger_unsigned_short_true);
82 COMPILE_ASSERT(IsConvertibleToInteger<int>::value, WTF_IsConvertibleToInteger_in t_true); 86 COMPILE_ASSERT(IsConvertibleToInteger<int>::value, WTF_IsConvertibleToInteger_in t_true);
83 COMPILE_ASSERT(IsConvertibleToInteger<unsigned>::value, WTF_IsConvertibleToInteg er_unsigned_int_true); 87 COMPILE_ASSERT(IsConvertibleToInteger<unsigned>::value, WTF_IsConvertibleToInteg er_unsigned_int_true);
84 COMPILE_ASSERT(IsConvertibleToInteger<long>::value, WTF_IsConvertibleToInteger_l ong_true); 88 COMPILE_ASSERT(IsConvertibleToInteger<long>::value, WTF_IsConvertibleToInteger_l ong_true);
85 COMPILE_ASSERT(IsConvertibleToInteger<unsigned long>::value, WTF_IsConvertibleTo Integer_unsigned_long_true); 89 COMPILE_ASSERT(IsConvertibleToInteger<unsigned long>::value, WTF_IsConvertibleTo Integer_unsigned_long_true);
86 COMPILE_ASSERT(IsConvertibleToInteger<long long>::value, WTF_IsConvertibleToInte ger_long_long_true); 90 COMPILE_ASSERT(IsConvertibleToInteger<long long>::value, WTF_IsConvertibleToInte ger_long_long_true);
87 COMPILE_ASSERT(IsConvertibleToInteger<unsigned long long>::value, WTF_IsConverti bleToInteger_unsigned_long_long_true); 91 COMPILE_ASSERT(IsConvertibleToInteger<unsigned long long>::value, WTF_IsConverti bleToInteger_unsigned_long_long_true);
92 #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
88 COMPILE_ASSERT(IsConvertibleToInteger<wchar_t>::value, WTF_IsConvertibleToIntege r_wchar_t_true); 93 COMPILE_ASSERT(IsConvertibleToInteger<wchar_t>::value, WTF_IsConvertibleToIntege r_wchar_t_true);
94 #endif
89 COMPILE_ASSERT(IsConvertibleToInteger<double>::value, WTF_IsConvertibleToInteger _double_true); 95 COMPILE_ASSERT(IsConvertibleToInteger<double>::value, WTF_IsConvertibleToInteger _double_true);
90 COMPILE_ASSERT(IsConvertibleToInteger<long double>::value, WTF_IsConvertibleToIn teger_long_double_true); 96 COMPILE_ASSERT(IsConvertibleToInteger<long double>::value, WTF_IsConvertibleToIn teger_long_double_true);
91 COMPILE_ASSERT(IsConvertibleToInteger<float>::value, WTF_IsConvertibleToInteger_ float_true); 97 COMPILE_ASSERT(IsConvertibleToInteger<float>::value, WTF_IsConvertibleToInteger_ float_true);
92 COMPILE_ASSERT(!IsConvertibleToInteger<char*>::value, WTF_IsConvertibleToInteger _char_pointer_false); 98 COMPILE_ASSERT(!IsConvertibleToInteger<char*>::value, WTF_IsConvertibleToInteger _char_pointer_false);
93 COMPILE_ASSERT(!IsConvertibleToInteger<const char*>::value, WTF_IsConvertibleToI nteger_const_char_pointer_false); 99 COMPILE_ASSERT(!IsConvertibleToInteger<const char*>::value, WTF_IsConvertibleToI nteger_const_char_pointer_false);
94 COMPILE_ASSERT(!IsConvertibleToInteger<volatile char*>::value, WTF_IsConvertible ToInteger_volatile_char_pointer_false); 100 COMPILE_ASSERT(!IsConvertibleToInteger<volatile char*>::value, WTF_IsConvertible ToInteger_volatile_char_pointer_false);
95 COMPILE_ASSERT(!IsConvertibleToInteger<IsConvertibleToInteger<bool> >::value, WT F_IsConvertibleToInteger_struct_false); 101 COMPILE_ASSERT(!IsConvertibleToInteger<IsConvertibleToInteger<bool> >::value, WT F_IsConvertibleToInteger_struct_false);
96 102
97 COMPILE_ASSERT((IsPointerConvertible<int, int>::Value), WTF_IsPointerConvertible _same_type_true); 103 COMPILE_ASSERT((IsPointerConvertible<int, int>::Value), WTF_IsPointerConvertible _same_type_true);
98 COMPILE_ASSERT((!IsPointerConvertible<int, unsigned>::Value), WTF_IsPointerConve rtible_int_to_unsigned_false); 104 COMPILE_ASSERT((!IsPointerConvertible<int, unsigned>::Value), WTF_IsPointerConve rtible_int_to_unsigned_false);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 typedef int IntArray[]; 150 typedef int IntArray[];
145 typedef int IntArraySized[4]; 151 typedef int IntArraySized[4];
146 152
147 COMPILE_ASSERT((IsArray<IntArray>::value), WTF_Test_IsArray_int_array); 153 COMPILE_ASSERT((IsArray<IntArray>::value), WTF_Test_IsArray_int_array);
148 COMPILE_ASSERT((IsArray<IntArraySized>::value), WTF_Test_IsArray_int_sized_array ); 154 COMPILE_ASSERT((IsArray<IntArraySized>::value), WTF_Test_IsArray_int_sized_array );
149 155
150 COMPILE_ASSERT((IsSameType<int, RemoveExtent<IntArray>::Type>::value), WTF_Test_ RemoveExtent_int_array); 156 COMPILE_ASSERT((IsSameType<int, RemoveExtent<IntArray>::Type>::value), WTF_Test_ RemoveExtent_int_array);
151 COMPILE_ASSERT((IsSameType<int, RemoveExtent<IntArraySized>::Type>::value), WTF_ Test_RemoveReference_int_sized_array); 157 COMPILE_ASSERT((IsSameType<int, RemoveExtent<IntArraySized>::Type>::value), WTF_ Test_RemoveReference_int_sized_array);
152 158
153 } // namespace WTF 159 } // namespace WTF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698