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