OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "bindings/core/v8/NativeValueTraits.h" |
| 6 |
| 7 #include <type_traits> |
| 8 #include "bindings/core/v8/IDLTypesBase.h" |
| 9 |
| 10 // No gtest tests; only static_assert checks. |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 template <> |
| 15 struct NativeValueTraits<bool> : public NativeValueTraitsBase<bool> {}; |
| 16 |
| 17 static_assert(std::is_same<NativeValueTraits<bool>::ImplType, bool>::value, |
| 18 "NativeValueTraitsBase works with non IDLBase-derived types"); |
| 19 |
| 20 struct MyIDLType final : public IDLBaseHelper<char> {}; |
| 21 template <> |
| 22 struct NativeValueTraits<MyIDLType> : public NativeValueTraitsBase<MyIDLType> { |
| 23 }; |
| 24 |
| 25 static_assert(std::is_same<NativeValueTraits<MyIDLType>::ImplType, char>::value, |
| 26 "NativeValueTraitsBase works with IDLBase-derived types"); |
| 27 |
| 28 } // namespace blink |
OLD | NEW |