@@ -88,20 +88,20 @@ namespace simplecpp {
8888 struct View
8989 {
9090 // cppcheck-suppress noExplicitConstructor
91- View (const char * data)
91+ View (const char * data SIMPLECPP_LIFETIMEBOUND )
9292 : mData (data)
9393 , mSize (strlen(data))
9494 {}
9595
9696 // only provide when std::span is not available so using untyped initialization won't use View
9797#if !defined(__cpp_lib_span)
98- View (const char * data, std::size_t size)
98+ View (const char * data SIMPLECPP_LIFETIMEBOUND , std::size_t size)
9999 : mData(data)
100100 , mSize(size)
101101 {}
102102
103103 // cppcheck-suppress noExplicitConstructor
104- View (const std::string& str)
104+ View (const std::string& str SIMPLECPP_LIFETIMEBOUND )
105105 : mData(str.data())
106106 , mSize(str.size())
107107 {}
@@ -269,9 +269,9 @@ namespace simplecpp {
269269 public:
270270 class Stream ;
271271
272- explicit TokenList (std::vector<std::string> &filenames);
272+ explicit TokenList (std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND );
273273 /* * generates a token list from the given std::istream parameter */
274- TokenList (std::istream &istr, std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr );
274+ TokenList (std::istream &istr, std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND , const std::string &filename=std::string(), OutputList *outputList = nullptr );
275275 /* * generates a token list from the given buffer */
276276 template <size_t size>
277277 TokenList (const char (&data)[size], std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr)
@@ -309,7 +309,7 @@ namespace simplecpp {
309309#endif // __cpp_lib_span
310310
311311 /* * generates a token list from the given filename parameter */
312- TokenList (const std::string &filename, std::vector<std::string> &filenames, OutputList *outputList = nullptr );
312+ TokenList (const std::string &filename, std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND , OutputList *outputList = nullptr );
313313 TokenList (const TokenList &other);
314314 TokenList (TokenList &&other);
315315 ~TokenList ();
@@ -389,7 +389,7 @@ namespace simplecpp {
389389 const std::string& file (const Location& loc) const ;
390390
391391 private:
392- TokenList (const unsigned char * data, std::size_t size, std::vector<std::string> &filenames, const std::string &filename, OutputList *outputList, int /* unused*/ );
392+ TokenList (const unsigned char * data, std::size_t size, std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND , const std::string &filename, OutputList *outputList, int /* unused*/ );
393393
394394 void combineOperators ();
395395
0 commit comments