2 Copyright 2019 Glen Joseph Fernandes
5 Distributed under the Boost Software License, Version 1.0.
6 (http://www.boost.org/LICENSE_1_0.txt)
8 #include <boost/config.hpp>
9 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
10 !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
11 #include <boost/functional/factory.hpp>
12 #include <boost/core/lightweight_test.hpp>
13 #include <boost/smart_ptr/scoped_ptr.hpp>
17 explicit sum(int a = 0, int b = 0, int c = 0, int d = 0,
18 int e = 0, int f = 0, int g = 0, int h = 0,
19 int i = 0, int j = 0, int k = 0, int l = 0)
20 : value_(a + b + c + d + e + f + g + h + i + j + k + l) { }
32 boost::scoped_ptr<sum> s(boost::factory<sum*>()(1, 2, 3, 4, 5, 6, 7, 8, 9,
34 BOOST_TEST(s->get() == 78);
35 return boost::report_errors();