From b3b3cde5ea306b78554fbc1642ccefa0d879b76b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Mon, 21 Nov 2011 13:54:01 +0000 Subject: [PATCH] Fixed compiler errors in the examples --- .../examples/STL_Extension/Dispatch_output_iterator.cpp | 1 + STL_Extension/examples/STL_Extension/Overload.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/STL_Extension/examples/STL_Extension/Dispatch_output_iterator.cpp b/STL_Extension/examples/STL_Extension/Dispatch_output_iterator.cpp index 02d20f4d641..a97e131f568 100644 --- a/STL_Extension/examples/STL_Extension/Dispatch_output_iterator.cpp +++ b/STL_Extension/examples/STL_Extension/Dispatch_output_iterator.cpp @@ -21,6 +21,7 @@ int main() std::back_inserter(b), std::back_inserter(c)); + typedef boost::variant var; var va = 23; var vb = 4.2; var vc = 'x'; // goes to a diff --git a/STL_Extension/examples/STL_Extension/Overload.cpp b/STL_Extension/examples/STL_Extension/Overload.cpp index 3ebfe36c841..09a91fbd73a 100644 --- a/STL_Extension/examples/STL_Extension/Overload.cpp +++ b/STL_Extension/examples/STL_Extension/Overload.cpp @@ -1,9 +1,11 @@ #include #include +#include // This file requires a compiler with support for the C++0x features auto and lambda int main() { +#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_TUPLE) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) auto overload = make_overload( function([](int) { return 1; }), function([](char) { return 2; }), @@ -11,7 +13,7 @@ int main() ); std::cout << o(1) << o('a') << " " << o(2.0) << std::endl; - +#endif return 0; }