@@ -84,20 +84,20 @@ namespace simplecpp {
8484 struct View
8585 {
8686 // cppcheck-suppress noExplicitConstructor
87- View (const char * data)
87+ View (const char * data SIMPLECPP_LIFETIMEBOUND )
8888 : mData (data)
8989 , mSize (strlen(data))
9090 {}
9191
9292 // only provide when std::span is not available so using untyped initialization won't use View
9393#if !defined(__cpp_lib_span)
94- View (const char * data, std::size_t size)
94+ View (const char * data SIMPLECPP_LIFETIMEBOUND , std::size_t size)
9595 : mData(data)
9696 , mSize(size)
9797 {}
9898
9999 // cppcheck-suppress noExplicitConstructor
100- View (const std::string& str)
100+ View (const std::string& str SIMPLECPP_LIFETIMEBOUND )
101101 : mData(str.data())
102102 , mSize(str.size())
103103 {}
@@ -265,9 +265,9 @@ namespace simplecpp {
265265 public:
266266 class Stream ;
267267
268- explicit TokenList (std::vector<std::string> &filenames);
268+ explicit TokenList (std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND );
269269 /* * generates a token list from the given std::istream parameter */
270- TokenList (std::istream &istr, std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr );
270+ TokenList (std::istream &istr, std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND , const std::string &filename=std::string(), OutputList *outputList = nullptr );
271271 /* * generates a token list from the given buffer */
272272 template <size_t size>
273273 TokenList (const char (&data)[size], std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr)
@@ -305,7 +305,7 @@ namespace simplecpp {
305305#endif // __cpp_lib_span
306306
307307 /* * generates a token list from the given filename parameter */
308- TokenList (const std::string &filename, std::vector<std::string> &filenames, OutputList *outputList = nullptr );
308+ TokenList (const std::string &filename, std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND , OutputList *outputList = nullptr );
309309 TokenList (const TokenList &other);
310310 TokenList (TokenList &&other);
311311 ~TokenList ();
@@ -385,7 +385,7 @@ namespace simplecpp {
385385 const std::string& file (const Location& loc) const ;
386386
387387 private:
388- TokenList (const unsigned char * data, std::size_t size, std::vector<std::string> &filenames, const std::string &filename, OutputList *outputList, int /* unused*/ );
388+ TokenList (const unsigned char * data, std::size_t size, std::vector<std::string> &filenames SIMPLECPP_LIFETIMEBOUND , const std::string &filename, OutputList *outputList, int /* unused*/ );
389389
390390 void combineOperators ();
391391
0 commit comments