// // Copyright 2012 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // numeric_lex.h: Functions to extract numeric values from string. #ifndef COMPILER_PREPROCESSOR_NUMERICLEX_H_ #define COMPILER_PREPROCESSOR_NUMERICLEX_H_ #include <sstream> namespace angle { namespace pp { inline std::ios::fmtflags numeric_base_int(const std::string &str) { … } // The following functions parse the given string to extract a numerical // value of the given type. These functions assume that the string is // of the correct form. They can only fail if the parsed value is too big, // in which case false is returned. template <typename IntType> bool numeric_lex_int(const std::string &str, IntType *value) { … } } // namespace pp } // namespace angle #endif // COMPILER_PREPROCESSOR_NUMERICLEX_H_