@@ -85,20 +85,20 @@ namespace simplecpp {
8585 struct View
8686 {
8787 // cppcheck-suppress noExplicitConstructor
88- View (const char * data)
88+ View (const char * data SIMPLECPP_LIFETIMEBOUND )
8989 : mData (data)
9090 , mSize (strlen(data))
9191 {}
9292
9393 // only provide when std::span is not available so using untyped initialization won't use View
9494#if !defined(__cpp_lib_span)
95- View (const char * data, std::size_t size)
95+ View (const char * data SIMPLECPP_LIFETIMEBOUND , std::size_t size)
9696 : mData(data)
9797 , mSize(size)
9898 {}
9999
100100 // cppcheck-suppress noExplicitConstructor
101- View (const std::string& str)
101+ View (const std::string& str SIMPLECPP_LIFETIMEBOUND )
102102 : mData(str.data())
103103 , mSize(str.size())
104104 {}
@@ -267,9 +267,9 @@ namespace simplecpp {
267267 public:
268268 class Stream ;
269269
270- explicit TokenList (std::vector<std::string> &filenames);
270+ explicit TokenList (std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND );
271271 /* * generates a token list from the given std::istream parameter */
272- TokenList (std::istream &istr, std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr );
272+ TokenList (std::istream &istr, std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND , const std::string &filename=std::string(), OutputList *outputList = nullptr );
273273 /* * generates a token list from the given buffer */
274274 template <size_t size>
275275 TokenList (const char (&data)[size], std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr)
@@ -307,7 +307,7 @@ namespace simplecpp {
307307#endif // __cpp_lib_span
308308
309309 /* * generates a token list from the given filename parameter */
310- TokenList (const std::string &filename, std::vector<std::string> &filenames, OutputList *outputList = nullptr );
310+ TokenList (const std::string &filename, std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND , OutputList *outputList = nullptr );
311311 TokenList (const TokenList &other);
312312 TokenList (TokenList &&other);
313313 ~TokenList ();
@@ -387,7 +387,7 @@ namespace simplecpp {
387387 const std::string& file (const Location& loc) const ;
388388
389389 private:
390- TokenList (const unsigned char * data, std::size_t size, std::vector<std::string> &filenames, const std::string &filename, OutputList *outputList, int /* unused*/ );
390+ TokenList (const unsigned char * data, std::size_t size, std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND , const std::string &filename, OutputList *outputList, int /* unused*/ );
391391
392392 void combineOperators ();
393393
0 commit comments