Fixed compiler errors in the examples

This commit is contained in:
Philipp Möller 2011-11-21 13:54:01 +00:00
parent 4f055d690f
commit b3b3cde5ea
2 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,7 @@ int main()
std::back_inserter(b),
std::back_inserter(c));
typedef boost::variant<int, double, char> var;
var va = 23; var vb = 4.2; var vc = 'x';
// goes to a

View File

@ -1,9 +1,11 @@
#include <iostream>
#include <CGAL/Overload.h>
#include <CGAL/compiler_config.h>
// 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(int)>([](int) { return 1; }),
function<int(char)>([](char) { return 2; }),
@ -11,7 +13,7 @@ int main()
);
std::cout << o(1) << o('a') << " " << o(2.0) << std::endl;
#endif
return 0;
}