File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 88#ifndef CATCH_STRING_MANIP_HPP_INCLUDED
99#define CATCH_STRING_MANIP_HPP_INCLUDED
1010
11+ #include < catch2/internal/catch_lifetimebound.hpp>
1112#include < catch2/internal/catch_stringref.hpp>
1213
1314#include < cstdint>
@@ -28,10 +29,10 @@ namespace Catch {
2829 // ! Returns a new string without whitespace at the start/end
2930 std::string trim ( std::string const & str );
3031 // ! Returns a substring of the original ref without whitespace. Beware lifetimes!
31- StringRef trim (StringRef ref);
32+ StringRef trim ( StringRef ref CATCH_ATTR_LIFETIMEBOUND );
3233
3334 // !!! Be aware, returns refs into original string - make sure original string outlives them
34- std::vector<StringRef> splitStringRef ( StringRef str, char delimiter );
35+ std::vector<StringRef> splitStringRef ( StringRef str CATCH_ATTR_LIFETIMEBOUND , char delimiter );
3536 bool replaceInPlace ( std::string& str, std::string const & replaceThis, std::string const & withThis );
3637
3738 /* *
@@ -49,7 +50,7 @@ namespace Catch {
4950 StringRef m_label;
5051
5152 public:
52- constexpr pluralise (std::uint64_t count, StringRef label):
53+ constexpr pluralise (std::uint64_t count, StringRef label CATCH_ATTR_LIFETIMEBOUND ):
5354 m_count(count),
5455 m_label(label)
5556 {}
Original file line number Diff line number Diff line change 88#ifndef CATCH_TEST_CASE_TRACKER_HPP_INCLUDED
99#define CATCH_TEST_CASE_TRACKER_HPP_INCLUDED
1010
11+ #include < catch2/internal/catch_lifetimebound.hpp>
1112#include < catch2/internal/catch_source_line_info.hpp>
1213#include < catch2/internal/catch_unique_ptr.hpp>
1314#include < catch2/internal/catch_stringref.hpp>
@@ -48,7 +49,7 @@ namespace TestCaseTracking {
4849 StringRef name;
4950 SourceLineInfo location;
5051
51- constexpr NameAndLocationRef ( StringRef name_,
52+ constexpr NameAndLocationRef ( StringRef name_ CATCH_ATTR_LIFETIMEBOUND ,
5253 SourceLineInfo location_ ):
5354 name( name_ ), location( location_ ) {}
5455
You can’t perform that action at this time.
0 commit comments