@@ -237,6 +237,17 @@ namespace simplecpp {
237237 /* * generates a token list from the given std::istream parameter */
238238 TokenList (std::istream &istr, std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr );
239239#ifdef SIMPLECPP_UNSAFE_API
240+ /* * generates a token list from the given buffer */
241+ template <size_t size>
242+ TokenList (const char (&data)[size], std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr)
243+ : TokenList(reinterpret_cast <const unsigned char *>(data), size-1, filenames, filename, outputList, 0)
244+ {}
245+ /* * generates a token list from the given buffer */
246+ template <size_t size>
247+ TokenList (const unsigned char (&data)[size], std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr)
248+ : TokenList(data, size-1 , filenames, filename, outputList, 0 )
249+ {}
250+
240251 /* * generates a token list from the given buffer */
241252 TokenList (const unsigned char * data, std::size_t size, std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr)
242253 : TokenList(data, size, filenames, filename, outputList, 0 )
0 commit comments