diff --git a/Installation/config/testfiles/CGAL_CFG_NO_DECLTYPE.cpp b/Installation/config/testfiles/CGAL_CFG_NO_DECLTYPE.cpp new file mode 100644 index 00000000000..11e4d887f32 --- /dev/null +++ b/Installation/config/testfiles/CGAL_CFG_NO_DECLTYPE.cpp @@ -0,0 +1,37 @@ +// Copyright (c) 2008 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// Author(s) : Sylvain Pion + +// --------------------------------------------------------------------- +// A short test program to evaluate a C++ compiler. +// This program is used by install_cgal. +// The following documentation will be pasted in the generated configfile. +// --------------------------------------------------------------------- + +//| If a compiler does not support decltype() (from C++0x) +//| CGAL_CFG_NO_DECLTYPE is set. + +void use(int) {} + +int main() +{ + int i = 2; + decltype(i+i) j = 3; + use(j); + return 0; +}