1
2// Copyright (C) 2009-2012 Lorenzo Caminiti
3// Distributed under the Boost Software License, Version 1.0
4// (see accompanying file LICENSE_1_0.txt or a copy at
5// http://www.boost.org/LICENSE_1_0.txt)
6// Home at http://www.boost.org/libs/local_function
7
8#include <boost/local_function.hpp>
9#include <boost/detail/lightweight_test.hpp>
10
11int main(void) {
12 int BOOST_LOCAL_FUNCTION( (int x) (int y)(default 2) ) {
13 return x + y;
14 } BOOST_LOCAL_FUNCTION_NAME(add)
15
16 BOOST_TEST(add(1) == 3);
17 return boost::report_errors();
18}
19
20

source code of boost/libs/local_function/test/add_default_seq.cpp