mirror of https://github.com/CGAL/cgal
New program for testing decltype() (a C++0x feature).
This commit is contained in:
parent
1f23ebbb53
commit
e4fb8a97a4
|
|
@ -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;
|
||||
}
|
||||
Loading…
Reference in New Issue