1 dnl @synopsis AC_CXX_TEMPLATES
3 dnl If the compiler supports basic templates, define HAVE_TEMPLATES.
5 dnl @version $Id: ac_cxx_templates.m4,v 1.1 2005/01/07 02:52:49 norwin Exp $
6 dnl @author Todd Veldhuizen and Luc Maisonobe <luc@spaceroots.org>
8 AC_DEFUN([AC_CXX_TEMPLATES],
9 [AC_CACHE_CHECK(whether the compiler supports basic templates,
13 AC_TRY_COMPILE([template<class T> class A {public:A(){}};
14 template<class T> void f(const A<T>& ){}],[
15 A<double> d; A<int> i; f(d); f(i); return 0;],
16 ac_cv_cxx_templates=yes, ac_cv_cxx_templates=no)
19 if test "$ac_cv_cxx_templates" = yes; then
20 AC_DEFINE(HAVE_TEMPLATES,,[define if the compiler supports basic templates])