Mercurial > hg > octave-lyh
changeset 14735:295bd3efc065
fix configure test for bit functions
* m4/acinclude.m4 (OCTAVE_CXX_BITWISE_OP_TEMPLATES): Use int in test,
not double.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 05 Jun 2012 17:49:02 -0400 |
parents | 4b8bfb4edf92 |
children | 94a8366f9f89 |
files | m4/acinclude.m4 |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -113,7 +113,11 @@ octave_cv_cxx_bitwise_op_templates, [AC_LANG_PUSH(C++) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <functional>]], -[[double x = 0.0, y = 1.0; double z1 = bit_and<double> (x, y); double z2 = bit_or<double> (x, y); double z1 = bit_xor<double> (x, y);]])], +[[int x = 0; +int y = 1; +int z1 = std::bit_and<int>() (x, y); +int z2 = std::bit_or<int>() (x, y); +int z3 = std::bit_xor<int>() (x, y);]])], octave_cv_cxx_bitwise_op_templates=yes, octave_cv_cxx_bitwise_op_templates=no)]) if test $octave_cv_cxx_bitwise_op_templates = yes; then AC_DEFINE(HAVE_CXX_BITWISE_OP_TEMPLATES,1,[Define if C++ library has templated bitwise operators])