2 dnl SIGC_CXX_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD()
5 AC_DEFUN([SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[
6 AC_MSG_CHECKING([if C++ compiler supports the use of a particular specialization when calling operator() template methods.])
7 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
18 void operator()(T a, T b)
21 std::cout << c << std::endl;
32 thing_.template operator()<T2>(1, 2);
33 //This fails with or without the template keyword, on SUN Forte C++ 5.3, 5.4, and 5.5:
38 OtherThing<int> thing;
42 sigcm_cxx_gcc_template_specialization_operator_overload=yes
43 AC_DEFINE([SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[1],[does the C++ compiler support the use of a particular specialization when calling operator() template methods.])
45 sigcm_cxx_gcc_template_specialization_operator_overload=no
47 AC_MSG_RESULT([$sigcm_cxx_gcc_template_specialization_operator_overload])
50 AC_DEFUN([SIGC_CXX_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[
51 AC_MSG_CHECKING([if C++ compiler supports the use of a particular specialization when calling operator() template methods omitting the template keyword.])
52 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
63 void operator()(T a, T b)
66 std::cout << c << std::endl;
77 thing_.operator()<T2>(1, 2);
78 //This fails with or without the template keyword, on SUN Forte C++ 5.3, 5.4, and 5.5:
83 OtherThing<int> thing;
87 sigcm_cxx_msvc_template_specialization_operator_overload=yes
88 AC_DEFINE([SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[1],[does the C++ compiler support the use of a particular specialization when calling operator() template methods omitting the template keyword.])
90 sigcm_cxx_msvc_template_specialization_operator_overload=no
92 AC_MSG_RESULT([$sigcm_cxx_msvc_template_specialization_operator_overload])
96 dnl SIGC_CXX_PRAGMA_PUSH_POP_MACRO
98 dnl TODO: When we can break ABI, delete this. It's used when nil is
99 dnl temporarily undefined. See comment in functor_trait.h.
101 AC_DEFUN([SIGC_CXX_PRAGMA_PUSH_POP_MACRO],[
102 AC_MSG_CHECKING([if C++ preprocessor supports pragma push_macro() and pop_macro().])
103 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
107 #pragma push_macro("BEGIN")
108 #pragma push_macro("END")
112 // BEGIN and END are not prepreprocessor macros
119 #pragma pop_macro("BEGIN")
120 #pragma pop_macro("END")
122 // BEGIN and END are prepreprocessor macros
129 void func1(Test1& x);
130 void func2(Test2& x);
139 sigcm_cxx_pragma_push_pop_macro=yes
140 AC_DEFINE([SIGC_PRAGMA_PUSH_POP_MACRO],[1],[does the C++ preprocessor support pragma push_macro() and pop_macro().])
142 sigcm_cxx_pragma_push_pop_macro=no
144 AC_MSG_RESULT([$sigcm_cxx_pragma_push_pop_macro])