blob: 7566a066c960998803dd62eb6278cf8e859806d0 [file] [log] [blame]
Brian Silverman9d8fa392018-08-04 17:09:24 -07001/*
2Copyright 2017 Glen Joseph Fernandes
3(glenjofe@gmail.com)
4
5Distributed under Boost Software License, Version 1.0.
6(See accompanying file LICENSE_1_0.txt or copy at
7http://www.boost.org/LICENSE_1_0.txt)
8*/
9
10// MACRO: BOOST_NO_CXX17_FOLD_EXPRESSIONS
11// TITLE: C++17 fold expressions
12// DESCRIPTION: C++17 fold expressions are not supported.
13
14namespace boost_no_cxx17_fold_expressions {
15
16template<class... Args>
17auto sum(Args&&... args)
18{
19 return (args + ... + 0);
20}
21
22int test()
23{
24 return sum(1, -1, 1, 1, -1, -1);
25}
26
27} /* boost_no_cxx17_fold_expressions */