• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
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 */
28