mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
8b619cad16
git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@53779 c7de825b-a66e-492c-adef-691d508d4ae1
17 lines
360 B
C++
17 lines
360 B
C++
// test explicit generation of a simple template function
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
template <class T> T my_max(T a, T b) {
|
|
return a > b ? a : b;
|
|
}
|
|
|
|
template int my_max(int a, int b);
|
|
|
|
int main(int argc, char *argv[]) {
|
|
int a = atoi(argv[1]);
|
|
int b = atoi(argv[2]);
|
|
printf("%d %d %d\n", a, b, my_max<int>(a, b));
|
|
return 0;
|
|
}
|