OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 #ifndef BASE_ENUM_VALIDATION_H |
| 6 #define BASE_ENUM_VALIDATION_H |
| 7 |
| 8 // Defines a function template which enum authors can specialize to perform |
| 9 // validation upon an untrusted value prior to its being cast to their enum |
| 10 // type. Intended mainly for use by (generated) unmarshalling code. |
| 11 template <typename T> inline bool IsIntValidForEnum(int x) { return true; } |
| 12 |
| 13 #endif // BASE_ENUM_VALIDATION_H |
OLD | NEW |