File: output20.cpp

package info (click to toggle)
kelbt 0.12-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,456 kB
  • ctags: 1,986
  • sloc: cpp: 8,015; ansic: 3,331; makefile: 137; sh: 92
file content (17 lines) | stat: -rw-r--r-- 258 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

struct [cn C]
{
	char $[di doit]({}) { return 'c'; }
};

template <{typename T, [cn T] $(|[cn C]::<*>[di f]|)({})}> [cn T] $[di g]({[cn C]$<*>[di c]})
{
	return (c->*f)();
}

int $[di main]({})
{
	[cn C] $[di c];
	g<|char, &[cn C]::doit|>(&c);
	return 0;
}