C
ciccio
Hi all,
The intel c++ compiler supports exported templates but I was wondering a
bit about their used syntax. If I compare the syntax written in
strostroup's book then there is a difference. So I was wondering if the
following syntax proposed by intel is correct.
Thanks a lot
// file1.cpp
#include <stdio.h>
static void trace() { printf("File 1\n"); }
export template<class T> T const& min(T const&, T const&);
int main() {
trace();
return min(2, 3);
}
// file2.cpp
#include <stdio.h>
static void trace() { printf("File 2\n"); }
export template<class T> T const& min(T const &a, T const &b) {
trace();
return a<b? a: b;
}
The intel c++ compiler supports exported templates but I was wondering a
bit about their used syntax. If I compare the syntax written in
strostroup's book then there is a difference. So I was wondering if the
following syntax proposed by intel is correct.
Thanks a lot
// file1.cpp
#include <stdio.h>
static void trace() { printf("File 1\n"); }
export template<class T> T const& min(T const&, T const&);
int main() {
trace();
return min(2, 3);
}
// file2.cpp
#include <stdio.h>
static void trace() { printf("File 2\n"); }
export template<class T> T const& min(T const &a, T const &b) {
trace();
return a<b? a: b;
}