• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
2 //
3 // Use, modification and distribution is subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #include <boost/core/ignore_unused.hpp>
8 
test_fun(int a)9 BOOST_CXX14_CONSTEXPR int test_fun(int a)
10 {
11     boost::ignore_unused(a);
12     return 0;
13 }
14 
main()15 int main()
16 {
17     {
18         int a;
19         boost::ignore_unused(a);
20     }
21     {
22         int a, b;
23         boost::ignore_unused(a, b);
24     }
25     {
26         int a, b, c;
27         boost::ignore_unused(a, b, c);
28     }
29     {
30         int a, b, c, d;
31         boost::ignore_unused(a, b, c, d);
32     }
33     {
34         int a, b, c, d, e;
35         boost::ignore_unused(a, b, c, d, e);
36     }
37 
38     {
39         typedef int a;
40         boost::ignore_unused<a>();
41     }
42     {
43         typedef int a;
44         typedef int b;
45         boost::ignore_unused<a, b>();
46     }
47     {
48         typedef int a;
49         typedef int b;
50         typedef int c;
51         boost::ignore_unused<a, b, c>();
52     }
53     {
54         typedef int a;
55         typedef int b;
56         typedef int c;
57         typedef int d;
58         boost::ignore_unused<a, b, c, d>();
59     }
60     {
61         typedef int a;
62         typedef int b;
63         typedef int c;
64         typedef int d;
65         typedef int e;
66         boost::ignore_unused<a, b, c, d, e>();
67     }
68 
69     {
70         BOOST_CXX14_CONSTEXPR const int a = test_fun(0);
71         boost::ignore_unused(a);
72     }
73 
74     return 0;
75 }
76