File: test13.cc

package info (click to toggle)
aspectc%2B%2B 1%3A2.3%2Bgit20241211-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 18,148 kB
  • sloc: cpp: 110,334; ansic: 7,644; sh: 2,262; makefile: 1,344; pascal: 634; python: 402; xml: 349
file content (18 lines) | stat: -rw-r--r-- 288 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/********************************************
 ** specialization for pointer to function **
 ********************************************/
 
void foo() {}
void bar() {}

template < void (*T)() >
struct X {
  X() { T(); }
};

template <>
struct X< &foo > {
};

X< &foo > x1;
X< &bar > x2;