mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-28 05:31:27 +00:00
Fix PR#30303 - no matching function for call to '__ptr_in_range'
llvm-svn: 280779
This commit is contained in:
1 parent
a7ade33d16
commit
a77bb8ef34
5 files changed
+47
-1
No files matched your search
+14
@@ -1023,4 +1023,18 @@ int main()
|
||||
s_long.replace(s_long.begin(), s_long.begin(), s_long.begin(), s_long.end());
|
||||
assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/");
|
||||
}
|
||||
|
||||
{ // test assigning a different type
|
||||
typedef std::string S;
|
||||
const uint8_t pc[] = "ABCD";
|
||||
uint8_t p[] = "EFGH";
|
||||
|
||||
S s;
|
||||
s.replace(s.begin(), s.end(), pc, pc + 4);
|
||||
assert(s == "ABCD");
|
||||
|
||||
s.clear();
|
||||
s.replace(s.begin(), s.end(), p, p + 4);
|
||||
assert(s == "EFGH");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user