From e4fb8a97a40f8958fa8e44f85484aeb15719f442 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Sun, 20 Jan 2008 23:00:51 +0000 Subject: [PATCH] New program for testing decltype() (a C++0x feature). --- .../config/testfiles/CGAL_CFG_NO_DECLTYPE.cpp | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Installation/config/testfiles/CGAL_CFG_NO_DECLTYPE.cpp 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; +}