File: s-std-string.cpp

package info (click to toggle)
uftrace 0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,264 kB
  • sloc: ansic: 49,132; python: 10,882; asm: 837; makefile: 760; cpp: 627; sh: 624; javascript: 191
file content (24 lines) | stat: -rw-r--r-- 400 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <string>

std::string s[] = { "Hello", "World!", "std::string support is done!" };

__attribute__((noinline)) void std_string_arg(std::string &s)
{
	s = s;
}

__attribute__((noinline)) std::string std_string_ret(int index)
{
	return s[index];
}

int main()
{
	std_string_arg(s[0]);
	std_string_arg(s[1]);
	std_string_arg(s[2]);

	std_string_ret(0);
	std_string_ret(1);
	std_string_ret(2);
}