1 | This file contains any messages produced by compilers while |
---|
2 | running configure, to aid debugging if configure makes a mistake. |
---|
3 | |
---|
4 | It was created by GIMP configure 2.10.0, which was |
---|
5 | generated by GNU Autoconf 2.69. Invocation command line was |
---|
6 | |
---|
7 | $ ./configure --prefix=/opt/local --build=x86_64-apple-darwin13.4.0 --enable-mp --enable-bundled-mypaint-brushes --with-pdbgen --with-x --x-includes=/opt/local/include --x-libraries=/opt/local/lib --disable-silent-rules --without-alsa --without-gudev --without-webkit ac_cv_path_INTLTOOL_PERL=/opt/local/bin/perl5.26 |
---|
8 | |
---|
9 | ## --------- ## |
---|
10 | ## Platform. ## |
---|
11 | ## --------- ## |
---|
12 | |
---|
13 | hostname = NerdCenter |
---|
14 | uname -m = x86_64 |
---|
15 | uname -r = 13.4.0 |
---|
16 | uname -s = Darwin |
---|
17 | uname -v = Darwin Kernel Version 13.4.0: Mon Jan 11 18:17:34 PST 2016; root:xnu-2422.115.15~1/RELEASE_X86_64 |
---|
18 | |
---|
19 | /usr/bin/uname -p = i386 |
---|
20 | /bin/uname -X = unknown |
---|
21 | |
---|
22 | /bin/arch = unknown |
---|
23 | /usr/bin/arch -k = unknown |
---|
24 | /usr/convex/getsysinfo = unknown |
---|
25 | /usr/bin/hostinfo = Mach kernel version: |
---|
26 | Darwin Kernel Version 13.4.0: Mon Jan 11 18:17:34 PST 2016; root:xnu-2422.115.15~1/RELEASE_X86_64 |
---|
27 | Kernel configured for up to 8 processors. |
---|
28 | 4 processors are physically available. |
---|
29 | 8 processors are logically available. |
---|
30 | Processor type: i486 (Intel 80486) |
---|
31 | Processors active: 0 1 2 3 4 5 6 7 |
---|
32 | Primary memory available: 16.00 gigabytes |
---|
33 | Default processor set: 167 tasks, 734 threads, 8 processors |
---|
34 | Load average: 2.18, Mach factor: 5.80 |
---|
35 | /bin/machine = unknown |
---|
36 | /usr/bin/oslevel = unknown |
---|
37 | /bin/universe = unknown |
---|
38 | |
---|
39 | PATH: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin |
---|
40 | PATH: /opt/local/bin |
---|
41 | PATH: /opt/local/sbin |
---|
42 | PATH: /bin |
---|
43 | PATH: /sbin |
---|
44 | PATH: /usr/bin |
---|
45 | PATH: /usr/sbin |
---|
46 | |
---|
47 | |
---|
48 | ## ----------- ## |
---|
49 | ## Core tests. ## |
---|
50 | ## ----------- ## |
---|
51 | |
---|
52 | configure:3170: checking for a BSD-compatible install |
---|
53 | configure:3238: result: /usr/bin/install -c |
---|
54 | configure:3249: checking whether build environment is sane |
---|
55 | configure:3304: result: yes |
---|
56 | configure:3455: checking for a thread-safe mkdir -p |
---|
57 | configure:3494: result: /opt/local/bin/gmkdir -p |
---|
58 | configure:3501: checking for gawk |
---|
59 | configure:3517: found /opt/local/bin/gawk |
---|
60 | configure:3528: result: gawk |
---|
61 | configure:3539: checking whether make sets $(MAKE) |
---|
62 | configure:3561: result: yes |
---|
63 | configure:3590: checking whether make supports nested variables |
---|
64 | configure:3607: result: yes |
---|
65 | configure:3739: checking whether make supports nested variables |
---|
66 | configure:3756: result: yes |
---|
67 | configure:3958: checking for gcc |
---|
68 | configure:3985: result: /usr/bin/clang |
---|
69 | configure:4214: checking for C compiler version |
---|
70 | configure:4223: /usr/bin/clang --version >&5 |
---|
71 | Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) |
---|
72 | Target: x86_64-apple-darwin13.4.0 |
---|
73 | Thread model: posix |
---|
74 | configure:4234: $? = 0 |
---|
75 | configure:4223: /usr/bin/clang -v >&5 |
---|
76 | Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) |
---|
77 | Target: x86_64-apple-darwin13.4.0 |
---|
78 | Thread model: posix |
---|
79 | configure:4234: $? = 0 |
---|
80 | configure:4223: /usr/bin/clang -V >&5 |
---|
81 | clang: error: argument to '-V' is missing (expected 1 value) |
---|
82 | clang: error: no input files |
---|
83 | configure:4234: $? = 1 |
---|
84 | configure:4223: /usr/bin/clang -qversion >&5 |
---|
85 | clang: error: unknown argument: '-qversion' |
---|
86 | clang: error: no input files |
---|
87 | configure:4234: $? = 1 |
---|
88 | configure:4254: checking whether the C compiler works |
---|
89 | configure:4276: /usr/bin/clang -pipe -Os -arch x86_64 -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 conftest.c >&5 |
---|
90 | configure:4280: $? = 0 |
---|
91 | configure:4328: result: yes |
---|
92 | configure:4331: checking for C compiler default output file name |
---|
93 | configure:4333: result: a.out |
---|
94 | configure:4339: checking for suffix of executables |
---|
95 | configure:4346: /usr/bin/clang -o conftest -pipe -Os -arch x86_64 -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 conftest.c >&5 |
---|
96 | configure:4350: $? = 0 |
---|
97 | configure:4372: result: |
---|
98 | configure:4394: checking whether we are cross compiling |
---|
99 | configure:4402: /usr/bin/clang -o conftest -pipe -Os -arch x86_64 -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 conftest.c >&5 |
---|
100 | configure:4406: $? = 0 |
---|
101 | configure:4413: ./conftest |
---|
102 | configure:4417: $? = 0 |
---|
103 | configure:4432: result: no |
---|
104 | configure:4437: checking for suffix of object files |
---|
105 | configure:4459: /usr/bin/clang -c -pipe -Os -arch x86_64 -I/opt/local/include conftest.c >&5 |
---|
106 | configure:4463: $? = 0 |
---|
107 | configure:4484: result: o |
---|
108 | configure:4488: checking whether we are using the GNU C compiler |
---|
109 | configure:4507: /usr/bin/clang -c -pipe -Os -arch x86_64 -I/opt/local/include conftest.c >&5 |
---|
110 | configure:4507: $? = 0 |
---|
111 | configure:4516: result: yes |
---|
112 | configure:4525: checking whether /usr/bin/clang accepts -g |
---|
113 | configure:4545: /usr/bin/clang -c -g -I/opt/local/include conftest.c >&5 |
---|
114 | configure:4545: $? = 0 |
---|
115 | configure:4586: result: yes |
---|
116 | configure:4603: checking for /usr/bin/clang option to accept ISO C89 |
---|
117 | configure:4666: /usr/bin/clang -c -pipe -Os -arch x86_64 -I/opt/local/include conftest.c >&5 |
---|
118 | configure:4666: $? = 0 |
---|
119 | configure:4679: result: none needed |
---|
120 | configure:4704: checking whether /usr/bin/clang understands -c and -o together |
---|
121 | configure:4726: /usr/bin/clang -c conftest.c -o conftest2.o |
---|
122 | configure:4729: $? = 0 |
---|
123 | configure:4726: /usr/bin/clang -c conftest.c -o conftest2.o |
---|
124 | configure:4729: $? = 0 |
---|
125 | configure:4741: result: yes |
---|
126 | configure:4761: checking whether make supports the include directive |
---|
127 | configure:4776: make -f confmf.GNU && cat confinc.out |
---|
128 | this is the am__doit target |
---|
129 | configure:4779: $? = 0 |
---|
130 | configure:4798: result: yes (GNU style) |
---|
131 | configure:4823: checking dependency style of /usr/bin/clang |
---|
132 | configure:4934: result: gcc3 |
---|
133 | configure:4954: checking how to run the C preprocessor |
---|
134 | configure:4985: /usr/bin/clang -E -I/opt/local/include conftest.c |
---|
135 | configure:4985: $? = 0 |
---|
136 | configure:4999: /usr/bin/clang -E -I/opt/local/include conftest.c |
---|
137 | conftest.c:10:10: fatal error: 'ac_nonexistent.h' file not found |
---|
138 | #include <ac_nonexistent.h> |
---|
139 | ^ |
---|
140 | 1 error generated. |
---|
141 | configure:4999: $? = 1 |
---|
142 | configure: failed program was: |
---|
143 | | /* confdefs.h */ |
---|
144 | | #define PACKAGE_NAME "GIMP" |
---|
145 | | #define PACKAGE_TARNAME "gimp" |
---|
146 | | #define PACKAGE_VERSION "2.10.0" |
---|
147 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
148 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
149 | | #define PACKAGE_URL "" |
---|
150 | | #define GETTEXT_PACKAGE "gimp20" |
---|
151 | | /* end confdefs.h. */ |
---|
152 | | #include <ac_nonexistent.h> |
---|
153 | configure:5024: result: /usr/bin/clang -E |
---|
154 | configure:5044: /usr/bin/clang -E -I/opt/local/include conftest.c |
---|
155 | configure:5044: $? = 0 |
---|
156 | configure:5058: /usr/bin/clang -E -I/opt/local/include conftest.c |
---|
157 | conftest.c:10:10: fatal error: 'ac_nonexistent.h' file not found |
---|
158 | #include <ac_nonexistent.h> |
---|
159 | ^ |
---|
160 | 1 error generated. |
---|
161 | configure:5058: $? = 1 |
---|
162 | configure: failed program was: |
---|
163 | | /* confdefs.h */ |
---|
164 | | #define PACKAGE_NAME "GIMP" |
---|
165 | | #define PACKAGE_TARNAME "gimp" |
---|
166 | | #define PACKAGE_VERSION "2.10.0" |
---|
167 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
168 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
169 | | #define PACKAGE_URL "" |
---|
170 | | #define GETTEXT_PACKAGE "gimp20" |
---|
171 | | /* end confdefs.h. */ |
---|
172 | | #include <ac_nonexistent.h> |
---|
173 | configure:5091: checking build system type |
---|
174 | configure:5105: result: x86_64-apple-darwin13.4.0 |
---|
175 | configure:5125: checking host system type |
---|
176 | configure:5138: result: x86_64-apple-darwin13.4.0 |
---|
177 | configure:5213: checking for gcc |
---|
178 | configure:5240: result: /usr/bin/clang |
---|
179 | configure:5469: checking for C compiler version |
---|
180 | configure:5478: /usr/bin/clang --version >&5 |
---|
181 | Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) |
---|
182 | Target: x86_64-apple-darwin13.4.0 |
---|
183 | Thread model: posix |
---|
184 | configure:5489: $? = 0 |
---|
185 | configure:5478: /usr/bin/clang -v >&5 |
---|
186 | Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) |
---|
187 | Target: x86_64-apple-darwin13.4.0 |
---|
188 | Thread model: posix |
---|
189 | configure:5489: $? = 0 |
---|
190 | configure:5478: /usr/bin/clang -V >&5 |
---|
191 | clang: error: argument to '-V' is missing (expected 1 value) |
---|
192 | clang: error: no input files |
---|
193 | configure:5489: $? = 1 |
---|
194 | configure:5478: /usr/bin/clang -qversion >&5 |
---|
195 | clang: error: unknown argument: '-qversion' |
---|
196 | clang: error: no input files |
---|
197 | configure:5489: $? = 1 |
---|
198 | configure:5493: checking whether we are using the GNU C compiler |
---|
199 | configure:5521: result: yes |
---|
200 | configure:5530: checking whether /usr/bin/clang accepts -g |
---|
201 | configure:5550: /usr/bin/clang -c -pipe -Os -arch x86_64 -I/opt/local/include conftest.c >&5 |
---|
202 | configure:5550: $? = 0 |
---|
203 | configure:5591: result: yes |
---|
204 | configure:5608: checking for /usr/bin/clang option to accept ISO C89 |
---|
205 | configure:5684: result: none needed |
---|
206 | configure:5709: checking whether /usr/bin/clang understands -c and -o together |
---|
207 | configure:5746: result: yes |
---|
208 | configure:5765: checking dependency style of /usr/bin/clang |
---|
209 | configure:5876: result: gcc3 |
---|
210 | configure:5896: checking how to run the C preprocessor |
---|
211 | configure:5927: /usr/bin/clang -E -I/opt/local/include conftest.c |
---|
212 | configure:5927: $? = 0 |
---|
213 | configure:5941: /usr/bin/clang -E -I/opt/local/include conftest.c |
---|
214 | conftest.c:10:10: fatal error: 'ac_nonexistent.h' file not found |
---|
215 | #include <ac_nonexistent.h> |
---|
216 | ^ |
---|
217 | 1 error generated. |
---|
218 | configure:5941: $? = 1 |
---|
219 | configure: failed program was: |
---|
220 | | /* confdefs.h */ |
---|
221 | | #define PACKAGE_NAME "GIMP" |
---|
222 | | #define PACKAGE_TARNAME "gimp" |
---|
223 | | #define PACKAGE_VERSION "2.10.0" |
---|
224 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
225 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
226 | | #define PACKAGE_URL "" |
---|
227 | | #define GETTEXT_PACKAGE "gimp20" |
---|
228 | | /* end confdefs.h. */ |
---|
229 | | #include <ac_nonexistent.h> |
---|
230 | configure:5966: result: /usr/bin/clang -E |
---|
231 | configure:5986: /usr/bin/clang -E -I/opt/local/include conftest.c |
---|
232 | configure:5986: $? = 0 |
---|
233 | configure:6000: /usr/bin/clang -E -I/opt/local/include conftest.c |
---|
234 | conftest.c:10:10: fatal error: 'ac_nonexistent.h' file not found |
---|
235 | #include <ac_nonexistent.h> |
---|
236 | ^ |
---|
237 | 1 error generated. |
---|
238 | configure:6000: $? = 1 |
---|
239 | configure: failed program was: |
---|
240 | | /* confdefs.h */ |
---|
241 | | #define PACKAGE_NAME "GIMP" |
---|
242 | | #define PACKAGE_TARNAME "gimp" |
---|
243 | | #define PACKAGE_VERSION "2.10.0" |
---|
244 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
245 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
246 | | #define PACKAGE_URL "" |
---|
247 | | #define GETTEXT_PACKAGE "gimp20" |
---|
248 | | /* end confdefs.h. */ |
---|
249 | | #include <ac_nonexistent.h> |
---|
250 | configure:6157: checking for C++ compiler version |
---|
251 | configure:6166: /usr/bin/clang++ --version >&5 |
---|
252 | Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) |
---|
253 | Target: x86_64-apple-darwin13.4.0 |
---|
254 | Thread model: posix |
---|
255 | configure:6177: $? = 0 |
---|
256 | configure:6166: /usr/bin/clang++ -v >&5 |
---|
257 | Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) |
---|
258 | Target: x86_64-apple-darwin13.4.0 |
---|
259 | Thread model: posix |
---|
260 | configure:6177: $? = 0 |
---|
261 | configure:6166: /usr/bin/clang++ -V >&5 |
---|
262 | clang: error: argument to '-V' is missing (expected 1 value) |
---|
263 | clang: error: no input files |
---|
264 | configure:6177: $? = 1 |
---|
265 | configure:6166: /usr/bin/clang++ -qversion >&5 |
---|
266 | clang: error: unknown argument: '-qversion' |
---|
267 | clang: error: no input files |
---|
268 | configure:6177: $? = 1 |
---|
269 | configure:6181: checking whether we are using the GNU C++ compiler |
---|
270 | configure:6200: /usr/bin/clang++ -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
271 | configure:6200: $? = 0 |
---|
272 | configure:6209: result: yes |
---|
273 | configure:6218: checking whether /usr/bin/clang++ accepts -g |
---|
274 | configure:6238: /usr/bin/clang++ -c -g -I/opt/local/include conftest.cpp >&5 |
---|
275 | configure:6238: $? = 0 |
---|
276 | configure:6279: result: yes |
---|
277 | configure:6304: checking dependency style of /usr/bin/clang++ |
---|
278 | configure:6415: result: gcc3 |
---|
279 | configure:6438: checking whether /usr/bin/clang++ supports C++14 features by default |
---|
280 | configure:6852: /usr/bin/clang++ -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
281 | conftest.cpp:21:2: error: "This is not a C++11 compiler" |
---|
282 | #error "This is not a C++11 compiler" |
---|
283 | ^ |
---|
284 | conftest.cpp:306:2: error: "This is not a C++14 compiler" |
---|
285 | #error "This is not a C++14 compiler" |
---|
286 | ^ |
---|
287 | 2 errors generated. |
---|
288 | configure:6852: $? = 1 |
---|
289 | configure: failed program was: |
---|
290 | | /* confdefs.h */ |
---|
291 | | #define PACKAGE_NAME "GIMP" |
---|
292 | | #define PACKAGE_TARNAME "gimp" |
---|
293 | | #define PACKAGE_VERSION "2.10.0" |
---|
294 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
295 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
296 | | #define PACKAGE_URL "" |
---|
297 | | #define GETTEXT_PACKAGE "gimp20" |
---|
298 | | /* end confdefs.h. */ |
---|
299 | | |
---|
300 | | |
---|
301 | | // If the compiler admits that it is not ready for C++11, why torture it? |
---|
302 | | // Hopefully, this will speed up the test. |
---|
303 | | |
---|
304 | | #ifndef __cplusplus |
---|
305 | | |
---|
306 | | #error "This is not a C++ compiler" |
---|
307 | | |
---|
308 | | #elif __cplusplus < 201103L |
---|
309 | | |
---|
310 | | #error "This is not a C++11 compiler" |
---|
311 | | |
---|
312 | | #else |
---|
313 | | |
---|
314 | | namespace cxx11 |
---|
315 | | { |
---|
316 | | |
---|
317 | | namespace test_static_assert |
---|
318 | | { |
---|
319 | | |
---|
320 | | template <typename T> |
---|
321 | | struct check |
---|
322 | | { |
---|
323 | | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
---|
324 | | }; |
---|
325 | | |
---|
326 | | } |
---|
327 | | |
---|
328 | | namespace test_final_override |
---|
329 | | { |
---|
330 | | |
---|
331 | | struct Base |
---|
332 | | { |
---|
333 | | virtual void f() {} |
---|
334 | | }; |
---|
335 | | |
---|
336 | | struct Derived : public Base |
---|
337 | | { |
---|
338 | | virtual void f() override {} |
---|
339 | | }; |
---|
340 | | |
---|
341 | | } |
---|
342 | | |
---|
343 | | namespace test_double_right_angle_brackets |
---|
344 | | { |
---|
345 | | |
---|
346 | | template < typename T > |
---|
347 | | struct check {}; |
---|
348 | | |
---|
349 | | typedef check<void> single_type; |
---|
350 | | typedef check<check<void>> double_type; |
---|
351 | | typedef check<check<check<void>>> triple_type; |
---|
352 | | typedef check<check<check<check<void>>>> quadruple_type; |
---|
353 | | |
---|
354 | | } |
---|
355 | | |
---|
356 | | namespace test_decltype |
---|
357 | | { |
---|
358 | | |
---|
359 | | int |
---|
360 | | f() |
---|
361 | | { |
---|
362 | | int a = 1; |
---|
363 | | decltype(a) b = 2; |
---|
364 | | return a + b; |
---|
365 | | } |
---|
366 | | |
---|
367 | | } |
---|
368 | | |
---|
369 | | namespace test_type_deduction |
---|
370 | | { |
---|
371 | | |
---|
372 | | template < typename T1, typename T2 > |
---|
373 | | struct is_same |
---|
374 | | { |
---|
375 | | static const bool value = false; |
---|
376 | | }; |
---|
377 | | |
---|
378 | | template < typename T > |
---|
379 | | struct is_same<T, T> |
---|
380 | | { |
---|
381 | | static const bool value = true; |
---|
382 | | }; |
---|
383 | | |
---|
384 | | template < typename T1, typename T2 > |
---|
385 | | auto |
---|
386 | | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
---|
387 | | { |
---|
388 | | return a1 + a2; |
---|
389 | | } |
---|
390 | | |
---|
391 | | int |
---|
392 | | test(const int c, volatile int v) |
---|
393 | | { |
---|
394 | | static_assert(is_same<int, decltype(0)>::value == true, ""); |
---|
395 | | static_assert(is_same<int, decltype(c)>::value == false, ""); |
---|
396 | | static_assert(is_same<int, decltype(v)>::value == false, ""); |
---|
397 | | auto ac = c; |
---|
398 | | auto av = v; |
---|
399 | | auto sumi = ac + av + 'x'; |
---|
400 | | auto sumf = ac + av + 1.0; |
---|
401 | | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
---|
402 | | static_assert(is_same<int, decltype(av)>::value == true, ""); |
---|
403 | | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
---|
404 | | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
---|
405 | | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
---|
406 | | return (sumf > 0.0) ? sumi : add(c, v); |
---|
407 | | } |
---|
408 | | |
---|
409 | | } |
---|
410 | | |
---|
411 | | namespace test_noexcept |
---|
412 | | { |
---|
413 | | |
---|
414 | | int f() { return 0; } |
---|
415 | | int g() noexcept { return 0; } |
---|
416 | | |
---|
417 | | static_assert(noexcept(f()) == false, ""); |
---|
418 | | static_assert(noexcept(g()) == true, ""); |
---|
419 | | |
---|
420 | | } |
---|
421 | | |
---|
422 | | namespace test_constexpr |
---|
423 | | { |
---|
424 | | |
---|
425 | | template < typename CharT > |
---|
426 | | unsigned long constexpr |
---|
427 | | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
---|
428 | | { |
---|
429 | | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
---|
430 | | } |
---|
431 | | |
---|
432 | | template < typename CharT > |
---|
433 | | unsigned long constexpr |
---|
434 | | strlen_c(const CharT *const s) noexcept |
---|
435 | | { |
---|
436 | | return strlen_c_r(s, 0UL); |
---|
437 | | } |
---|
438 | | |
---|
439 | | static_assert(strlen_c("") == 0UL, ""); |
---|
440 | | static_assert(strlen_c("1") == 1UL, ""); |
---|
441 | | static_assert(strlen_c("example") == 7UL, ""); |
---|
442 | | static_assert(strlen_c("another\0example") == 7UL, ""); |
---|
443 | | |
---|
444 | | } |
---|
445 | | |
---|
446 | | namespace test_rvalue_references |
---|
447 | | { |
---|
448 | | |
---|
449 | | template < int N > |
---|
450 | | struct answer |
---|
451 | | { |
---|
452 | | static constexpr int value = N; |
---|
453 | | }; |
---|
454 | | |
---|
455 | | answer<1> f(int&) { return answer<1>(); } |
---|
456 | | answer<2> f(const int&) { return answer<2>(); } |
---|
457 | | answer<3> f(int&&) { return answer<3>(); } |
---|
458 | | |
---|
459 | | void |
---|
460 | | test() |
---|
461 | | { |
---|
462 | | int i = 0; |
---|
463 | | const int c = 0; |
---|
464 | | static_assert(decltype(f(i))::value == 1, ""); |
---|
465 | | static_assert(decltype(f(c))::value == 2, ""); |
---|
466 | | static_assert(decltype(f(0))::value == 3, ""); |
---|
467 | | } |
---|
468 | | |
---|
469 | | } |
---|
470 | | |
---|
471 | | namespace test_uniform_initialization |
---|
472 | | { |
---|
473 | | |
---|
474 | | struct test |
---|
475 | | { |
---|
476 | | static const int zero {}; |
---|
477 | | static const int one {1}; |
---|
478 | | }; |
---|
479 | | |
---|
480 | | static_assert(test::zero == 0, ""); |
---|
481 | | static_assert(test::one == 1, ""); |
---|
482 | | |
---|
483 | | } |
---|
484 | | |
---|
485 | | namespace test_lambdas |
---|
486 | | { |
---|
487 | | |
---|
488 | | void |
---|
489 | | test1() |
---|
490 | | { |
---|
491 | | auto lambda1 = [](){}; |
---|
492 | | auto lambda2 = lambda1; |
---|
493 | | lambda1(); |
---|
494 | | lambda2(); |
---|
495 | | } |
---|
496 | | |
---|
497 | | int |
---|
498 | | test2() |
---|
499 | | { |
---|
500 | | auto a = [](int i, int j){ return i + j; }(1, 2); |
---|
501 | | auto b = []() -> int { return '0'; }(); |
---|
502 | | auto c = [=](){ return a + b; }(); |
---|
503 | | auto d = [&](){ return c; }(); |
---|
504 | | auto e = [a, &b](int x) mutable { |
---|
505 | | const auto identity = [](int y){ return y; }; |
---|
506 | | for (auto i = 0; i < a; ++i) |
---|
507 | | a += b--; |
---|
508 | | return x + identity(a + b); |
---|
509 | | }(0); |
---|
510 | | return a + b + c + d + e; |
---|
511 | | } |
---|
512 | | |
---|
513 | | int |
---|
514 | | test3() |
---|
515 | | { |
---|
516 | | const auto nullary = [](){ return 0; }; |
---|
517 | | const auto unary = [](int x){ return x; }; |
---|
518 | | using nullary_t = decltype(nullary); |
---|
519 | | using unary_t = decltype(unary); |
---|
520 | | const auto higher1st = [](nullary_t f){ return f(); }; |
---|
521 | | const auto higher2nd = [unary](nullary_t f1){ |
---|
522 | | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
---|
523 | | }; |
---|
524 | | return higher1st(nullary) + higher2nd(nullary)(unary); |
---|
525 | | } |
---|
526 | | |
---|
527 | | } |
---|
528 | | |
---|
529 | | namespace test_variadic_templates |
---|
530 | | { |
---|
531 | | |
---|
532 | | template <int...> |
---|
533 | | struct sum; |
---|
534 | | |
---|
535 | | template <int N0, int... N1toN> |
---|
536 | | struct sum<N0, N1toN...> |
---|
537 | | { |
---|
538 | | static constexpr auto value = N0 + sum<N1toN...>::value; |
---|
539 | | }; |
---|
540 | | |
---|
541 | | template <> |
---|
542 | | struct sum<> |
---|
543 | | { |
---|
544 | | static constexpr auto value = 0; |
---|
545 | | }; |
---|
546 | | |
---|
547 | | static_assert(sum<>::value == 0, ""); |
---|
548 | | static_assert(sum<1>::value == 1, ""); |
---|
549 | | static_assert(sum<23>::value == 23, ""); |
---|
550 | | static_assert(sum<1, 2>::value == 3, ""); |
---|
551 | | static_assert(sum<5, 5, 11>::value == 21, ""); |
---|
552 | | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
---|
553 | | |
---|
554 | | } |
---|
555 | | |
---|
556 | | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
---|
557 | | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
---|
558 | | // because of this. |
---|
559 | | namespace test_template_alias_sfinae |
---|
560 | | { |
---|
561 | | |
---|
562 | | struct foo {}; |
---|
563 | | |
---|
564 | | template<typename T> |
---|
565 | | using member = typename T::member_type; |
---|
566 | | |
---|
567 | | template<typename T> |
---|
568 | | void func(...) {} |
---|
569 | | |
---|
570 | | template<typename T> |
---|
571 | | void func(member<T>*) {} |
---|
572 | | |
---|
573 | | void test(); |
---|
574 | | |
---|
575 | | void test() { func<foo>(0); } |
---|
576 | | |
---|
577 | | } |
---|
578 | | |
---|
579 | | } // namespace cxx11 |
---|
580 | | |
---|
581 | | #endif // __cplusplus >= 201103L |
---|
582 | | |
---|
583 | | |
---|
584 | | |
---|
585 | | |
---|
586 | | // If the compiler admits that it is not ready for C++14, why torture it? |
---|
587 | | // Hopefully, this will speed up the test. |
---|
588 | | |
---|
589 | | #ifndef __cplusplus |
---|
590 | | |
---|
591 | | #error "This is not a C++ compiler" |
---|
592 | | |
---|
593 | | #elif __cplusplus < 201402L |
---|
594 | | |
---|
595 | | #error "This is not a C++14 compiler" |
---|
596 | | |
---|
597 | | #else |
---|
598 | | |
---|
599 | | namespace cxx14 |
---|
600 | | { |
---|
601 | | |
---|
602 | | namespace test_polymorphic_lambdas |
---|
603 | | { |
---|
604 | | |
---|
605 | | int |
---|
606 | | test() |
---|
607 | | { |
---|
608 | | const auto lambda = [](auto&&... args){ |
---|
609 | | const auto istiny = [](auto x){ |
---|
610 | | return (sizeof(x) == 1UL) ? 1 : 0; |
---|
611 | | }; |
---|
612 | | const int aretiny[] = { istiny(args)... }; |
---|
613 | | return aretiny[0]; |
---|
614 | | }; |
---|
615 | | return lambda(1, 1L, 1.0f, '1'); |
---|
616 | | } |
---|
617 | | |
---|
618 | | } |
---|
619 | | |
---|
620 | | namespace test_binary_literals |
---|
621 | | { |
---|
622 | | |
---|
623 | | constexpr auto ivii = 0b0000000000101010; |
---|
624 | | static_assert(ivii == 42, "wrong value"); |
---|
625 | | |
---|
626 | | } |
---|
627 | | |
---|
628 | | namespace test_generalized_constexpr |
---|
629 | | { |
---|
630 | | |
---|
631 | | template < typename CharT > |
---|
632 | | constexpr unsigned long |
---|
633 | | strlen_c(const CharT *const s) noexcept |
---|
634 | | { |
---|
635 | | auto length = 0UL; |
---|
636 | | for (auto p = s; *p; ++p) |
---|
637 | | ++length; |
---|
638 | | return length; |
---|
639 | | } |
---|
640 | | |
---|
641 | | static_assert(strlen_c("") == 0UL, ""); |
---|
642 | | static_assert(strlen_c("x") == 1UL, ""); |
---|
643 | | static_assert(strlen_c("test") == 4UL, ""); |
---|
644 | | static_assert(strlen_c("another\0test") == 7UL, ""); |
---|
645 | | |
---|
646 | | } |
---|
647 | | |
---|
648 | | namespace test_lambda_init_capture |
---|
649 | | { |
---|
650 | | |
---|
651 | | int |
---|
652 | | test() |
---|
653 | | { |
---|
654 | | auto x = 0; |
---|
655 | | const auto lambda1 = [a = x](int b){ return a + b; }; |
---|
656 | | const auto lambda2 = [a = lambda1(x)](){ return a; }; |
---|
657 | | return lambda2(); |
---|
658 | | } |
---|
659 | | |
---|
660 | | } |
---|
661 | | |
---|
662 | | namespace test_digit_separators |
---|
663 | | { |
---|
664 | | |
---|
665 | | constexpr auto ten_million = 100'000'000; |
---|
666 | | static_assert(ten_million == 100000000, ""); |
---|
667 | | |
---|
668 | | } |
---|
669 | | |
---|
670 | | namespace test_return_type_deduction |
---|
671 | | { |
---|
672 | | |
---|
673 | | auto f(int& x) { return x; } |
---|
674 | | decltype(auto) g(int& x) { return x; } |
---|
675 | | |
---|
676 | | template < typename T1, typename T2 > |
---|
677 | | struct is_same |
---|
678 | | { |
---|
679 | | static constexpr auto value = false; |
---|
680 | | }; |
---|
681 | | |
---|
682 | | template < typename T > |
---|
683 | | struct is_same<T, T> |
---|
684 | | { |
---|
685 | | static constexpr auto value = true; |
---|
686 | | }; |
---|
687 | | |
---|
688 | | int |
---|
689 | | test() |
---|
690 | | { |
---|
691 | | auto x = 0; |
---|
692 | | static_assert(is_same<int, decltype(f(x))>::value, ""); |
---|
693 | | static_assert(is_same<int&, decltype(g(x))>::value, ""); |
---|
694 | | return x; |
---|
695 | | } |
---|
696 | | |
---|
697 | | } |
---|
698 | | |
---|
699 | | } // namespace cxx14 |
---|
700 | | |
---|
701 | | #endif // __cplusplus >= 201402L |
---|
702 | | |
---|
703 | | |
---|
704 | | |
---|
705 | configure:6859: result: no |
---|
706 | configure:6869: checking whether /usr/bin/clang++ supports C++14 features with -std=gnu++14 |
---|
707 | configure:7285: /usr/bin/clang++ -std=gnu++14 -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
708 | error: invalid value 'gnu++14' in '-std=gnu++14' |
---|
709 | configure:7285: $? = 1 |
---|
710 | configure: failed program was: |
---|
711 | | /* confdefs.h */ |
---|
712 | | #define PACKAGE_NAME "GIMP" |
---|
713 | | #define PACKAGE_TARNAME "gimp" |
---|
714 | | #define PACKAGE_VERSION "2.10.0" |
---|
715 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
716 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
717 | | #define PACKAGE_URL "" |
---|
718 | | #define GETTEXT_PACKAGE "gimp20" |
---|
719 | | /* end confdefs.h. */ |
---|
720 | | |
---|
721 | | |
---|
722 | | // If the compiler admits that it is not ready for C++11, why torture it? |
---|
723 | | // Hopefully, this will speed up the test. |
---|
724 | | |
---|
725 | | #ifndef __cplusplus |
---|
726 | | |
---|
727 | | #error "This is not a C++ compiler" |
---|
728 | | |
---|
729 | | #elif __cplusplus < 201103L |
---|
730 | | |
---|
731 | | #error "This is not a C++11 compiler" |
---|
732 | | |
---|
733 | | #else |
---|
734 | | |
---|
735 | | namespace cxx11 |
---|
736 | | { |
---|
737 | | |
---|
738 | | namespace test_static_assert |
---|
739 | | { |
---|
740 | | |
---|
741 | | template <typename T> |
---|
742 | | struct check |
---|
743 | | { |
---|
744 | | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
---|
745 | | }; |
---|
746 | | |
---|
747 | | } |
---|
748 | | |
---|
749 | | namespace test_final_override |
---|
750 | | { |
---|
751 | | |
---|
752 | | struct Base |
---|
753 | | { |
---|
754 | | virtual void f() {} |
---|
755 | | }; |
---|
756 | | |
---|
757 | | struct Derived : public Base |
---|
758 | | { |
---|
759 | | virtual void f() override {} |
---|
760 | | }; |
---|
761 | | |
---|
762 | | } |
---|
763 | | |
---|
764 | | namespace test_double_right_angle_brackets |
---|
765 | | { |
---|
766 | | |
---|
767 | | template < typename T > |
---|
768 | | struct check {}; |
---|
769 | | |
---|
770 | | typedef check<void> single_type; |
---|
771 | | typedef check<check<void>> double_type; |
---|
772 | | typedef check<check<check<void>>> triple_type; |
---|
773 | | typedef check<check<check<check<void>>>> quadruple_type; |
---|
774 | | |
---|
775 | | } |
---|
776 | | |
---|
777 | | namespace test_decltype |
---|
778 | | { |
---|
779 | | |
---|
780 | | int |
---|
781 | | f() |
---|
782 | | { |
---|
783 | | int a = 1; |
---|
784 | | decltype(a) b = 2; |
---|
785 | | return a + b; |
---|
786 | | } |
---|
787 | | |
---|
788 | | } |
---|
789 | | |
---|
790 | | namespace test_type_deduction |
---|
791 | | { |
---|
792 | | |
---|
793 | | template < typename T1, typename T2 > |
---|
794 | | struct is_same |
---|
795 | | { |
---|
796 | | static const bool value = false; |
---|
797 | | }; |
---|
798 | | |
---|
799 | | template < typename T > |
---|
800 | | struct is_same<T, T> |
---|
801 | | { |
---|
802 | | static const bool value = true; |
---|
803 | | }; |
---|
804 | | |
---|
805 | | template < typename T1, typename T2 > |
---|
806 | | auto |
---|
807 | | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
---|
808 | | { |
---|
809 | | return a1 + a2; |
---|
810 | | } |
---|
811 | | |
---|
812 | | int |
---|
813 | | test(const int c, volatile int v) |
---|
814 | | { |
---|
815 | | static_assert(is_same<int, decltype(0)>::value == true, ""); |
---|
816 | | static_assert(is_same<int, decltype(c)>::value == false, ""); |
---|
817 | | static_assert(is_same<int, decltype(v)>::value == false, ""); |
---|
818 | | auto ac = c; |
---|
819 | | auto av = v; |
---|
820 | | auto sumi = ac + av + 'x'; |
---|
821 | | auto sumf = ac + av + 1.0; |
---|
822 | | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
---|
823 | | static_assert(is_same<int, decltype(av)>::value == true, ""); |
---|
824 | | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
---|
825 | | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
---|
826 | | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
---|
827 | | return (sumf > 0.0) ? sumi : add(c, v); |
---|
828 | | } |
---|
829 | | |
---|
830 | | } |
---|
831 | | |
---|
832 | | namespace test_noexcept |
---|
833 | | { |
---|
834 | | |
---|
835 | | int f() { return 0; } |
---|
836 | | int g() noexcept { return 0; } |
---|
837 | | |
---|
838 | | static_assert(noexcept(f()) == false, ""); |
---|
839 | | static_assert(noexcept(g()) == true, ""); |
---|
840 | | |
---|
841 | | } |
---|
842 | | |
---|
843 | | namespace test_constexpr |
---|
844 | | { |
---|
845 | | |
---|
846 | | template < typename CharT > |
---|
847 | | unsigned long constexpr |
---|
848 | | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
---|
849 | | { |
---|
850 | | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
---|
851 | | } |
---|
852 | | |
---|
853 | | template < typename CharT > |
---|
854 | | unsigned long constexpr |
---|
855 | | strlen_c(const CharT *const s) noexcept |
---|
856 | | { |
---|
857 | | return strlen_c_r(s, 0UL); |
---|
858 | | } |
---|
859 | | |
---|
860 | | static_assert(strlen_c("") == 0UL, ""); |
---|
861 | | static_assert(strlen_c("1") == 1UL, ""); |
---|
862 | | static_assert(strlen_c("example") == 7UL, ""); |
---|
863 | | static_assert(strlen_c("another\0example") == 7UL, ""); |
---|
864 | | |
---|
865 | | } |
---|
866 | | |
---|
867 | | namespace test_rvalue_references |
---|
868 | | { |
---|
869 | | |
---|
870 | | template < int N > |
---|
871 | | struct answer |
---|
872 | | { |
---|
873 | | static constexpr int value = N; |
---|
874 | | }; |
---|
875 | | |
---|
876 | | answer<1> f(int&) { return answer<1>(); } |
---|
877 | | answer<2> f(const int&) { return answer<2>(); } |
---|
878 | | answer<3> f(int&&) { return answer<3>(); } |
---|
879 | | |
---|
880 | | void |
---|
881 | | test() |
---|
882 | | { |
---|
883 | | int i = 0; |
---|
884 | | const int c = 0; |
---|
885 | | static_assert(decltype(f(i))::value == 1, ""); |
---|
886 | | static_assert(decltype(f(c))::value == 2, ""); |
---|
887 | | static_assert(decltype(f(0))::value == 3, ""); |
---|
888 | | } |
---|
889 | | |
---|
890 | | } |
---|
891 | | |
---|
892 | | namespace test_uniform_initialization |
---|
893 | | { |
---|
894 | | |
---|
895 | | struct test |
---|
896 | | { |
---|
897 | | static const int zero {}; |
---|
898 | | static const int one {1}; |
---|
899 | | }; |
---|
900 | | |
---|
901 | | static_assert(test::zero == 0, ""); |
---|
902 | | static_assert(test::one == 1, ""); |
---|
903 | | |
---|
904 | | } |
---|
905 | | |
---|
906 | | namespace test_lambdas |
---|
907 | | { |
---|
908 | | |
---|
909 | | void |
---|
910 | | test1() |
---|
911 | | { |
---|
912 | | auto lambda1 = [](){}; |
---|
913 | | auto lambda2 = lambda1; |
---|
914 | | lambda1(); |
---|
915 | | lambda2(); |
---|
916 | | } |
---|
917 | | |
---|
918 | | int |
---|
919 | | test2() |
---|
920 | | { |
---|
921 | | auto a = [](int i, int j){ return i + j; }(1, 2); |
---|
922 | | auto b = []() -> int { return '0'; }(); |
---|
923 | | auto c = [=](){ return a + b; }(); |
---|
924 | | auto d = [&](){ return c; }(); |
---|
925 | | auto e = [a, &b](int x) mutable { |
---|
926 | | const auto identity = [](int y){ return y; }; |
---|
927 | | for (auto i = 0; i < a; ++i) |
---|
928 | | a += b--; |
---|
929 | | return x + identity(a + b); |
---|
930 | | }(0); |
---|
931 | | return a + b + c + d + e; |
---|
932 | | } |
---|
933 | | |
---|
934 | | int |
---|
935 | | test3() |
---|
936 | | { |
---|
937 | | const auto nullary = [](){ return 0; }; |
---|
938 | | const auto unary = [](int x){ return x; }; |
---|
939 | | using nullary_t = decltype(nullary); |
---|
940 | | using unary_t = decltype(unary); |
---|
941 | | const auto higher1st = [](nullary_t f){ return f(); }; |
---|
942 | | const auto higher2nd = [unary](nullary_t f1){ |
---|
943 | | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
---|
944 | | }; |
---|
945 | | return higher1st(nullary) + higher2nd(nullary)(unary); |
---|
946 | | } |
---|
947 | | |
---|
948 | | } |
---|
949 | | |
---|
950 | | namespace test_variadic_templates |
---|
951 | | { |
---|
952 | | |
---|
953 | | template <int...> |
---|
954 | | struct sum; |
---|
955 | | |
---|
956 | | template <int N0, int... N1toN> |
---|
957 | | struct sum<N0, N1toN...> |
---|
958 | | { |
---|
959 | | static constexpr auto value = N0 + sum<N1toN...>::value; |
---|
960 | | }; |
---|
961 | | |
---|
962 | | template <> |
---|
963 | | struct sum<> |
---|
964 | | { |
---|
965 | | static constexpr auto value = 0; |
---|
966 | | }; |
---|
967 | | |
---|
968 | | static_assert(sum<>::value == 0, ""); |
---|
969 | | static_assert(sum<1>::value == 1, ""); |
---|
970 | | static_assert(sum<23>::value == 23, ""); |
---|
971 | | static_assert(sum<1, 2>::value == 3, ""); |
---|
972 | | static_assert(sum<5, 5, 11>::value == 21, ""); |
---|
973 | | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
---|
974 | | |
---|
975 | | } |
---|
976 | | |
---|
977 | | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
---|
978 | | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
---|
979 | | // because of this. |
---|
980 | | namespace test_template_alias_sfinae |
---|
981 | | { |
---|
982 | | |
---|
983 | | struct foo {}; |
---|
984 | | |
---|
985 | | template<typename T> |
---|
986 | | using member = typename T::member_type; |
---|
987 | | |
---|
988 | | template<typename T> |
---|
989 | | void func(...) {} |
---|
990 | | |
---|
991 | | template<typename T> |
---|
992 | | void func(member<T>*) {} |
---|
993 | | |
---|
994 | | void test(); |
---|
995 | | |
---|
996 | | void test() { func<foo>(0); } |
---|
997 | | |
---|
998 | | } |
---|
999 | | |
---|
1000 | | } // namespace cxx11 |
---|
1001 | | |
---|
1002 | | #endif // __cplusplus >= 201103L |
---|
1003 | | |
---|
1004 | | |
---|
1005 | | |
---|
1006 | | |
---|
1007 | | // If the compiler admits that it is not ready for C++14, why torture it? |
---|
1008 | | // Hopefully, this will speed up the test. |
---|
1009 | | |
---|
1010 | | #ifndef __cplusplus |
---|
1011 | | |
---|
1012 | | #error "This is not a C++ compiler" |
---|
1013 | | |
---|
1014 | | #elif __cplusplus < 201402L |
---|
1015 | | |
---|
1016 | | #error "This is not a C++14 compiler" |
---|
1017 | | |
---|
1018 | | #else |
---|
1019 | | |
---|
1020 | | namespace cxx14 |
---|
1021 | | { |
---|
1022 | | |
---|
1023 | | namespace test_polymorphic_lambdas |
---|
1024 | | { |
---|
1025 | | |
---|
1026 | | int |
---|
1027 | | test() |
---|
1028 | | { |
---|
1029 | | const auto lambda = [](auto&&... args){ |
---|
1030 | | const auto istiny = [](auto x){ |
---|
1031 | | return (sizeof(x) == 1UL) ? 1 : 0; |
---|
1032 | | }; |
---|
1033 | | const int aretiny[] = { istiny(args)... }; |
---|
1034 | | return aretiny[0]; |
---|
1035 | | }; |
---|
1036 | | return lambda(1, 1L, 1.0f, '1'); |
---|
1037 | | } |
---|
1038 | | |
---|
1039 | | } |
---|
1040 | | |
---|
1041 | | namespace test_binary_literals |
---|
1042 | | { |
---|
1043 | | |
---|
1044 | | constexpr auto ivii = 0b0000000000101010; |
---|
1045 | | static_assert(ivii == 42, "wrong value"); |
---|
1046 | | |
---|
1047 | | } |
---|
1048 | | |
---|
1049 | | namespace test_generalized_constexpr |
---|
1050 | | { |
---|
1051 | | |
---|
1052 | | template < typename CharT > |
---|
1053 | | constexpr unsigned long |
---|
1054 | | strlen_c(const CharT *const s) noexcept |
---|
1055 | | { |
---|
1056 | | auto length = 0UL; |
---|
1057 | | for (auto p = s; *p; ++p) |
---|
1058 | | ++length; |
---|
1059 | | return length; |
---|
1060 | | } |
---|
1061 | | |
---|
1062 | | static_assert(strlen_c("") == 0UL, ""); |
---|
1063 | | static_assert(strlen_c("x") == 1UL, ""); |
---|
1064 | | static_assert(strlen_c("test") == 4UL, ""); |
---|
1065 | | static_assert(strlen_c("another\0test") == 7UL, ""); |
---|
1066 | | |
---|
1067 | | } |
---|
1068 | | |
---|
1069 | | namespace test_lambda_init_capture |
---|
1070 | | { |
---|
1071 | | |
---|
1072 | | int |
---|
1073 | | test() |
---|
1074 | | { |
---|
1075 | | auto x = 0; |
---|
1076 | | const auto lambda1 = [a = x](int b){ return a + b; }; |
---|
1077 | | const auto lambda2 = [a = lambda1(x)](){ return a; }; |
---|
1078 | | return lambda2(); |
---|
1079 | | } |
---|
1080 | | |
---|
1081 | | } |
---|
1082 | | |
---|
1083 | | namespace test_digit_separators |
---|
1084 | | { |
---|
1085 | | |
---|
1086 | | constexpr auto ten_million = 100'000'000; |
---|
1087 | | static_assert(ten_million == 100000000, ""); |
---|
1088 | | |
---|
1089 | | } |
---|
1090 | | |
---|
1091 | | namespace test_return_type_deduction |
---|
1092 | | { |
---|
1093 | | |
---|
1094 | | auto f(int& x) { return x; } |
---|
1095 | | decltype(auto) g(int& x) { return x; } |
---|
1096 | | |
---|
1097 | | template < typename T1, typename T2 > |
---|
1098 | | struct is_same |
---|
1099 | | { |
---|
1100 | | static constexpr auto value = false; |
---|
1101 | | }; |
---|
1102 | | |
---|
1103 | | template < typename T > |
---|
1104 | | struct is_same<T, T> |
---|
1105 | | { |
---|
1106 | | static constexpr auto value = true; |
---|
1107 | | }; |
---|
1108 | | |
---|
1109 | | int |
---|
1110 | | test() |
---|
1111 | | { |
---|
1112 | | auto x = 0; |
---|
1113 | | static_assert(is_same<int, decltype(f(x))>::value, ""); |
---|
1114 | | static_assert(is_same<int&, decltype(g(x))>::value, ""); |
---|
1115 | | return x; |
---|
1116 | | } |
---|
1117 | | |
---|
1118 | | } |
---|
1119 | | |
---|
1120 | | } // namespace cxx14 |
---|
1121 | | |
---|
1122 | | #endif // __cplusplus >= 201402L |
---|
1123 | | |
---|
1124 | | |
---|
1125 | | |
---|
1126 | configure:7294: result: no |
---|
1127 | configure:6869: checking whether /usr/bin/clang++ supports C++14 features with -std=gnu++1y |
---|
1128 | configure:7285: /usr/bin/clang++ -std=gnu++1y -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
1129 | conftest.cpp:306:2: error: "This is not a C++14 compiler" |
---|
1130 | #error "This is not a C++14 compiler" |
---|
1131 | ^ |
---|
1132 | 1 error generated. |
---|
1133 | configure:7285: $? = 1 |
---|
1134 | configure: failed program was: |
---|
1135 | | /* confdefs.h */ |
---|
1136 | | #define PACKAGE_NAME "GIMP" |
---|
1137 | | #define PACKAGE_TARNAME "gimp" |
---|
1138 | | #define PACKAGE_VERSION "2.10.0" |
---|
1139 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
1140 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
1141 | | #define PACKAGE_URL "" |
---|
1142 | | #define GETTEXT_PACKAGE "gimp20" |
---|
1143 | | /* end confdefs.h. */ |
---|
1144 | | |
---|
1145 | | |
---|
1146 | | // If the compiler admits that it is not ready for C++11, why torture it? |
---|
1147 | | // Hopefully, this will speed up the test. |
---|
1148 | | |
---|
1149 | | #ifndef __cplusplus |
---|
1150 | | |
---|
1151 | | #error "This is not a C++ compiler" |
---|
1152 | | |
---|
1153 | | #elif __cplusplus < 201103L |
---|
1154 | | |
---|
1155 | | #error "This is not a C++11 compiler" |
---|
1156 | | |
---|
1157 | | #else |
---|
1158 | | |
---|
1159 | | namespace cxx11 |
---|
1160 | | { |
---|
1161 | | |
---|
1162 | | namespace test_static_assert |
---|
1163 | | { |
---|
1164 | | |
---|
1165 | | template <typename T> |
---|
1166 | | struct check |
---|
1167 | | { |
---|
1168 | | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
---|
1169 | | }; |
---|
1170 | | |
---|
1171 | | } |
---|
1172 | | |
---|
1173 | | namespace test_final_override |
---|
1174 | | { |
---|
1175 | | |
---|
1176 | | struct Base |
---|
1177 | | { |
---|
1178 | | virtual void f() {} |
---|
1179 | | }; |
---|
1180 | | |
---|
1181 | | struct Derived : public Base |
---|
1182 | | { |
---|
1183 | | virtual void f() override {} |
---|
1184 | | }; |
---|
1185 | | |
---|
1186 | | } |
---|
1187 | | |
---|
1188 | | namespace test_double_right_angle_brackets |
---|
1189 | | { |
---|
1190 | | |
---|
1191 | | template < typename T > |
---|
1192 | | struct check {}; |
---|
1193 | | |
---|
1194 | | typedef check<void> single_type; |
---|
1195 | | typedef check<check<void>> double_type; |
---|
1196 | | typedef check<check<check<void>>> triple_type; |
---|
1197 | | typedef check<check<check<check<void>>>> quadruple_type; |
---|
1198 | | |
---|
1199 | | } |
---|
1200 | | |
---|
1201 | | namespace test_decltype |
---|
1202 | | { |
---|
1203 | | |
---|
1204 | | int |
---|
1205 | | f() |
---|
1206 | | { |
---|
1207 | | int a = 1; |
---|
1208 | | decltype(a) b = 2; |
---|
1209 | | return a + b; |
---|
1210 | | } |
---|
1211 | | |
---|
1212 | | } |
---|
1213 | | |
---|
1214 | | namespace test_type_deduction |
---|
1215 | | { |
---|
1216 | | |
---|
1217 | | template < typename T1, typename T2 > |
---|
1218 | | struct is_same |
---|
1219 | | { |
---|
1220 | | static const bool value = false; |
---|
1221 | | }; |
---|
1222 | | |
---|
1223 | | template < typename T > |
---|
1224 | | struct is_same<T, T> |
---|
1225 | | { |
---|
1226 | | static const bool value = true; |
---|
1227 | | }; |
---|
1228 | | |
---|
1229 | | template < typename T1, typename T2 > |
---|
1230 | | auto |
---|
1231 | | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
---|
1232 | | { |
---|
1233 | | return a1 + a2; |
---|
1234 | | } |
---|
1235 | | |
---|
1236 | | int |
---|
1237 | | test(const int c, volatile int v) |
---|
1238 | | { |
---|
1239 | | static_assert(is_same<int, decltype(0)>::value == true, ""); |
---|
1240 | | static_assert(is_same<int, decltype(c)>::value == false, ""); |
---|
1241 | | static_assert(is_same<int, decltype(v)>::value == false, ""); |
---|
1242 | | auto ac = c; |
---|
1243 | | auto av = v; |
---|
1244 | | auto sumi = ac + av + 'x'; |
---|
1245 | | auto sumf = ac + av + 1.0; |
---|
1246 | | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
---|
1247 | | static_assert(is_same<int, decltype(av)>::value == true, ""); |
---|
1248 | | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
---|
1249 | | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
---|
1250 | | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
---|
1251 | | return (sumf > 0.0) ? sumi : add(c, v); |
---|
1252 | | } |
---|
1253 | | |
---|
1254 | | } |
---|
1255 | | |
---|
1256 | | namespace test_noexcept |
---|
1257 | | { |
---|
1258 | | |
---|
1259 | | int f() { return 0; } |
---|
1260 | | int g() noexcept { return 0; } |
---|
1261 | | |
---|
1262 | | static_assert(noexcept(f()) == false, ""); |
---|
1263 | | static_assert(noexcept(g()) == true, ""); |
---|
1264 | | |
---|
1265 | | } |
---|
1266 | | |
---|
1267 | | namespace test_constexpr |
---|
1268 | | { |
---|
1269 | | |
---|
1270 | | template < typename CharT > |
---|
1271 | | unsigned long constexpr |
---|
1272 | | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
---|
1273 | | { |
---|
1274 | | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
---|
1275 | | } |
---|
1276 | | |
---|
1277 | | template < typename CharT > |
---|
1278 | | unsigned long constexpr |
---|
1279 | | strlen_c(const CharT *const s) noexcept |
---|
1280 | | { |
---|
1281 | | return strlen_c_r(s, 0UL); |
---|
1282 | | } |
---|
1283 | | |
---|
1284 | | static_assert(strlen_c("") == 0UL, ""); |
---|
1285 | | static_assert(strlen_c("1") == 1UL, ""); |
---|
1286 | | static_assert(strlen_c("example") == 7UL, ""); |
---|
1287 | | static_assert(strlen_c("another\0example") == 7UL, ""); |
---|
1288 | | |
---|
1289 | | } |
---|
1290 | | |
---|
1291 | | namespace test_rvalue_references |
---|
1292 | | { |
---|
1293 | | |
---|
1294 | | template < int N > |
---|
1295 | | struct answer |
---|
1296 | | { |
---|
1297 | | static constexpr int value = N; |
---|
1298 | | }; |
---|
1299 | | |
---|
1300 | | answer<1> f(int&) { return answer<1>(); } |
---|
1301 | | answer<2> f(const int&) { return answer<2>(); } |
---|
1302 | | answer<3> f(int&&) { return answer<3>(); } |
---|
1303 | | |
---|
1304 | | void |
---|
1305 | | test() |
---|
1306 | | { |
---|
1307 | | int i = 0; |
---|
1308 | | const int c = 0; |
---|
1309 | | static_assert(decltype(f(i))::value == 1, ""); |
---|
1310 | | static_assert(decltype(f(c))::value == 2, ""); |
---|
1311 | | static_assert(decltype(f(0))::value == 3, ""); |
---|
1312 | | } |
---|
1313 | | |
---|
1314 | | } |
---|
1315 | | |
---|
1316 | | namespace test_uniform_initialization |
---|
1317 | | { |
---|
1318 | | |
---|
1319 | | struct test |
---|
1320 | | { |
---|
1321 | | static const int zero {}; |
---|
1322 | | static const int one {1}; |
---|
1323 | | }; |
---|
1324 | | |
---|
1325 | | static_assert(test::zero == 0, ""); |
---|
1326 | | static_assert(test::one == 1, ""); |
---|
1327 | | |
---|
1328 | | } |
---|
1329 | | |
---|
1330 | | namespace test_lambdas |
---|
1331 | | { |
---|
1332 | | |
---|
1333 | | void |
---|
1334 | | test1() |
---|
1335 | | { |
---|
1336 | | auto lambda1 = [](){}; |
---|
1337 | | auto lambda2 = lambda1; |
---|
1338 | | lambda1(); |
---|
1339 | | lambda2(); |
---|
1340 | | } |
---|
1341 | | |
---|
1342 | | int |
---|
1343 | | test2() |
---|
1344 | | { |
---|
1345 | | auto a = [](int i, int j){ return i + j; }(1, 2); |
---|
1346 | | auto b = []() -> int { return '0'; }(); |
---|
1347 | | auto c = [=](){ return a + b; }(); |
---|
1348 | | auto d = [&](){ return c; }(); |
---|
1349 | | auto e = [a, &b](int x) mutable { |
---|
1350 | | const auto identity = [](int y){ return y; }; |
---|
1351 | | for (auto i = 0; i < a; ++i) |
---|
1352 | | a += b--; |
---|
1353 | | return x + identity(a + b); |
---|
1354 | | }(0); |
---|
1355 | | return a + b + c + d + e; |
---|
1356 | | } |
---|
1357 | | |
---|
1358 | | int |
---|
1359 | | test3() |
---|
1360 | | { |
---|
1361 | | const auto nullary = [](){ return 0; }; |
---|
1362 | | const auto unary = [](int x){ return x; }; |
---|
1363 | | using nullary_t = decltype(nullary); |
---|
1364 | | using unary_t = decltype(unary); |
---|
1365 | | const auto higher1st = [](nullary_t f){ return f(); }; |
---|
1366 | | const auto higher2nd = [unary](nullary_t f1){ |
---|
1367 | | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
---|
1368 | | }; |
---|
1369 | | return higher1st(nullary) + higher2nd(nullary)(unary); |
---|
1370 | | } |
---|
1371 | | |
---|
1372 | | } |
---|
1373 | | |
---|
1374 | | namespace test_variadic_templates |
---|
1375 | | { |
---|
1376 | | |
---|
1377 | | template <int...> |
---|
1378 | | struct sum; |
---|
1379 | | |
---|
1380 | | template <int N0, int... N1toN> |
---|
1381 | | struct sum<N0, N1toN...> |
---|
1382 | | { |
---|
1383 | | static constexpr auto value = N0 + sum<N1toN...>::value; |
---|
1384 | | }; |
---|
1385 | | |
---|
1386 | | template <> |
---|
1387 | | struct sum<> |
---|
1388 | | { |
---|
1389 | | static constexpr auto value = 0; |
---|
1390 | | }; |
---|
1391 | | |
---|
1392 | | static_assert(sum<>::value == 0, ""); |
---|
1393 | | static_assert(sum<1>::value == 1, ""); |
---|
1394 | | static_assert(sum<23>::value == 23, ""); |
---|
1395 | | static_assert(sum<1, 2>::value == 3, ""); |
---|
1396 | | static_assert(sum<5, 5, 11>::value == 21, ""); |
---|
1397 | | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
---|
1398 | | |
---|
1399 | | } |
---|
1400 | | |
---|
1401 | | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
---|
1402 | | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
---|
1403 | | // because of this. |
---|
1404 | | namespace test_template_alias_sfinae |
---|
1405 | | { |
---|
1406 | | |
---|
1407 | | struct foo {}; |
---|
1408 | | |
---|
1409 | | template<typename T> |
---|
1410 | | using member = typename T::member_type; |
---|
1411 | | |
---|
1412 | | template<typename T> |
---|
1413 | | void func(...) {} |
---|
1414 | | |
---|
1415 | | template<typename T> |
---|
1416 | | void func(member<T>*) {} |
---|
1417 | | |
---|
1418 | | void test(); |
---|
1419 | | |
---|
1420 | | void test() { func<foo>(0); } |
---|
1421 | | |
---|
1422 | | } |
---|
1423 | | |
---|
1424 | | } // namespace cxx11 |
---|
1425 | | |
---|
1426 | | #endif // __cplusplus >= 201103L |
---|
1427 | | |
---|
1428 | | |
---|
1429 | | |
---|
1430 | | |
---|
1431 | | // If the compiler admits that it is not ready for C++14, why torture it? |
---|
1432 | | // Hopefully, this will speed up the test. |
---|
1433 | | |
---|
1434 | | #ifndef __cplusplus |
---|
1435 | | |
---|
1436 | | #error "This is not a C++ compiler" |
---|
1437 | | |
---|
1438 | | #elif __cplusplus < 201402L |
---|
1439 | | |
---|
1440 | | #error "This is not a C++14 compiler" |
---|
1441 | | |
---|
1442 | | #else |
---|
1443 | | |
---|
1444 | | namespace cxx14 |
---|
1445 | | { |
---|
1446 | | |
---|
1447 | | namespace test_polymorphic_lambdas |
---|
1448 | | { |
---|
1449 | | |
---|
1450 | | int |
---|
1451 | | test() |
---|
1452 | | { |
---|
1453 | | const auto lambda = [](auto&&... args){ |
---|
1454 | | const auto istiny = [](auto x){ |
---|
1455 | | return (sizeof(x) == 1UL) ? 1 : 0; |
---|
1456 | | }; |
---|
1457 | | const int aretiny[] = { istiny(args)... }; |
---|
1458 | | return aretiny[0]; |
---|
1459 | | }; |
---|
1460 | | return lambda(1, 1L, 1.0f, '1'); |
---|
1461 | | } |
---|
1462 | | |
---|
1463 | | } |
---|
1464 | | |
---|
1465 | | namespace test_binary_literals |
---|
1466 | | { |
---|
1467 | | |
---|
1468 | | constexpr auto ivii = 0b0000000000101010; |
---|
1469 | | static_assert(ivii == 42, "wrong value"); |
---|
1470 | | |
---|
1471 | | } |
---|
1472 | | |
---|
1473 | | namespace test_generalized_constexpr |
---|
1474 | | { |
---|
1475 | | |
---|
1476 | | template < typename CharT > |
---|
1477 | | constexpr unsigned long |
---|
1478 | | strlen_c(const CharT *const s) noexcept |
---|
1479 | | { |
---|
1480 | | auto length = 0UL; |
---|
1481 | | for (auto p = s; *p; ++p) |
---|
1482 | | ++length; |
---|
1483 | | return length; |
---|
1484 | | } |
---|
1485 | | |
---|
1486 | | static_assert(strlen_c("") == 0UL, ""); |
---|
1487 | | static_assert(strlen_c("x") == 1UL, ""); |
---|
1488 | | static_assert(strlen_c("test") == 4UL, ""); |
---|
1489 | | static_assert(strlen_c("another\0test") == 7UL, ""); |
---|
1490 | | |
---|
1491 | | } |
---|
1492 | | |
---|
1493 | | namespace test_lambda_init_capture |
---|
1494 | | { |
---|
1495 | | |
---|
1496 | | int |
---|
1497 | | test() |
---|
1498 | | { |
---|
1499 | | auto x = 0; |
---|
1500 | | const auto lambda1 = [a = x](int b){ return a + b; }; |
---|
1501 | | const auto lambda2 = [a = lambda1(x)](){ return a; }; |
---|
1502 | | return lambda2(); |
---|
1503 | | } |
---|
1504 | | |
---|
1505 | | } |
---|
1506 | | |
---|
1507 | | namespace test_digit_separators |
---|
1508 | | { |
---|
1509 | | |
---|
1510 | | constexpr auto ten_million = 100'000'000; |
---|
1511 | | static_assert(ten_million == 100000000, ""); |
---|
1512 | | |
---|
1513 | | } |
---|
1514 | | |
---|
1515 | | namespace test_return_type_deduction |
---|
1516 | | { |
---|
1517 | | |
---|
1518 | | auto f(int& x) { return x; } |
---|
1519 | | decltype(auto) g(int& x) { return x; } |
---|
1520 | | |
---|
1521 | | template < typename T1, typename T2 > |
---|
1522 | | struct is_same |
---|
1523 | | { |
---|
1524 | | static constexpr auto value = false; |
---|
1525 | | }; |
---|
1526 | | |
---|
1527 | | template < typename T > |
---|
1528 | | struct is_same<T, T> |
---|
1529 | | { |
---|
1530 | | static constexpr auto value = true; |
---|
1531 | | }; |
---|
1532 | | |
---|
1533 | | int |
---|
1534 | | test() |
---|
1535 | | { |
---|
1536 | | auto x = 0; |
---|
1537 | | static_assert(is_same<int, decltype(f(x))>::value, ""); |
---|
1538 | | static_assert(is_same<int&, decltype(g(x))>::value, ""); |
---|
1539 | | return x; |
---|
1540 | | } |
---|
1541 | | |
---|
1542 | | } |
---|
1543 | | |
---|
1544 | | } // namespace cxx14 |
---|
1545 | | |
---|
1546 | | #endif // __cplusplus >= 201402L |
---|
1547 | | |
---|
1548 | | |
---|
1549 | | |
---|
1550 | configure:7294: result: no |
---|
1551 | configure:7311: checking whether /usr/bin/clang++ supports C++14 features with -std=c++14 |
---|
1552 | configure:7727: /usr/bin/clang++ -std=c++14 -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
1553 | error: invalid value 'c++14' in '-std=c++14' |
---|
1554 | configure:7727: $? = 1 |
---|
1555 | configure: failed program was: |
---|
1556 | | /* confdefs.h */ |
---|
1557 | | #define PACKAGE_NAME "GIMP" |
---|
1558 | | #define PACKAGE_TARNAME "gimp" |
---|
1559 | | #define PACKAGE_VERSION "2.10.0" |
---|
1560 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
1561 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
1562 | | #define PACKAGE_URL "" |
---|
1563 | | #define GETTEXT_PACKAGE "gimp20" |
---|
1564 | | /* end confdefs.h. */ |
---|
1565 | | |
---|
1566 | | |
---|
1567 | | // If the compiler admits that it is not ready for C++11, why torture it? |
---|
1568 | | // Hopefully, this will speed up the test. |
---|
1569 | | |
---|
1570 | | #ifndef __cplusplus |
---|
1571 | | |
---|
1572 | | #error "This is not a C++ compiler" |
---|
1573 | | |
---|
1574 | | #elif __cplusplus < 201103L |
---|
1575 | | |
---|
1576 | | #error "This is not a C++11 compiler" |
---|
1577 | | |
---|
1578 | | #else |
---|
1579 | | |
---|
1580 | | namespace cxx11 |
---|
1581 | | { |
---|
1582 | | |
---|
1583 | | namespace test_static_assert |
---|
1584 | | { |
---|
1585 | | |
---|
1586 | | template <typename T> |
---|
1587 | | struct check |
---|
1588 | | { |
---|
1589 | | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
---|
1590 | | }; |
---|
1591 | | |
---|
1592 | | } |
---|
1593 | | |
---|
1594 | | namespace test_final_override |
---|
1595 | | { |
---|
1596 | | |
---|
1597 | | struct Base |
---|
1598 | | { |
---|
1599 | | virtual void f() {} |
---|
1600 | | }; |
---|
1601 | | |
---|
1602 | | struct Derived : public Base |
---|
1603 | | { |
---|
1604 | | virtual void f() override {} |
---|
1605 | | }; |
---|
1606 | | |
---|
1607 | | } |
---|
1608 | | |
---|
1609 | | namespace test_double_right_angle_brackets |
---|
1610 | | { |
---|
1611 | | |
---|
1612 | | template < typename T > |
---|
1613 | | struct check {}; |
---|
1614 | | |
---|
1615 | | typedef check<void> single_type; |
---|
1616 | | typedef check<check<void>> double_type; |
---|
1617 | | typedef check<check<check<void>>> triple_type; |
---|
1618 | | typedef check<check<check<check<void>>>> quadruple_type; |
---|
1619 | | |
---|
1620 | | } |
---|
1621 | | |
---|
1622 | | namespace test_decltype |
---|
1623 | | { |
---|
1624 | | |
---|
1625 | | int |
---|
1626 | | f() |
---|
1627 | | { |
---|
1628 | | int a = 1; |
---|
1629 | | decltype(a) b = 2; |
---|
1630 | | return a + b; |
---|
1631 | | } |
---|
1632 | | |
---|
1633 | | } |
---|
1634 | | |
---|
1635 | | namespace test_type_deduction |
---|
1636 | | { |
---|
1637 | | |
---|
1638 | | template < typename T1, typename T2 > |
---|
1639 | | struct is_same |
---|
1640 | | { |
---|
1641 | | static const bool value = false; |
---|
1642 | | }; |
---|
1643 | | |
---|
1644 | | template < typename T > |
---|
1645 | | struct is_same<T, T> |
---|
1646 | | { |
---|
1647 | | static const bool value = true; |
---|
1648 | | }; |
---|
1649 | | |
---|
1650 | | template < typename T1, typename T2 > |
---|
1651 | | auto |
---|
1652 | | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
---|
1653 | | { |
---|
1654 | | return a1 + a2; |
---|
1655 | | } |
---|
1656 | | |
---|
1657 | | int |
---|
1658 | | test(const int c, volatile int v) |
---|
1659 | | { |
---|
1660 | | static_assert(is_same<int, decltype(0)>::value == true, ""); |
---|
1661 | | static_assert(is_same<int, decltype(c)>::value == false, ""); |
---|
1662 | | static_assert(is_same<int, decltype(v)>::value == false, ""); |
---|
1663 | | auto ac = c; |
---|
1664 | | auto av = v; |
---|
1665 | | auto sumi = ac + av + 'x'; |
---|
1666 | | auto sumf = ac + av + 1.0; |
---|
1667 | | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
---|
1668 | | static_assert(is_same<int, decltype(av)>::value == true, ""); |
---|
1669 | | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
---|
1670 | | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
---|
1671 | | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
---|
1672 | | return (sumf > 0.0) ? sumi : add(c, v); |
---|
1673 | | } |
---|
1674 | | |
---|
1675 | | } |
---|
1676 | | |
---|
1677 | | namespace test_noexcept |
---|
1678 | | { |
---|
1679 | | |
---|
1680 | | int f() { return 0; } |
---|
1681 | | int g() noexcept { return 0; } |
---|
1682 | | |
---|
1683 | | static_assert(noexcept(f()) == false, ""); |
---|
1684 | | static_assert(noexcept(g()) == true, ""); |
---|
1685 | | |
---|
1686 | | } |
---|
1687 | | |
---|
1688 | | namespace test_constexpr |
---|
1689 | | { |
---|
1690 | | |
---|
1691 | | template < typename CharT > |
---|
1692 | | unsigned long constexpr |
---|
1693 | | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
---|
1694 | | { |
---|
1695 | | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
---|
1696 | | } |
---|
1697 | | |
---|
1698 | | template < typename CharT > |
---|
1699 | | unsigned long constexpr |
---|
1700 | | strlen_c(const CharT *const s) noexcept |
---|
1701 | | { |
---|
1702 | | return strlen_c_r(s, 0UL); |
---|
1703 | | } |
---|
1704 | | |
---|
1705 | | static_assert(strlen_c("") == 0UL, ""); |
---|
1706 | | static_assert(strlen_c("1") == 1UL, ""); |
---|
1707 | | static_assert(strlen_c("example") == 7UL, ""); |
---|
1708 | | static_assert(strlen_c("another\0example") == 7UL, ""); |
---|
1709 | | |
---|
1710 | | } |
---|
1711 | | |
---|
1712 | | namespace test_rvalue_references |
---|
1713 | | { |
---|
1714 | | |
---|
1715 | | template < int N > |
---|
1716 | | struct answer |
---|
1717 | | { |
---|
1718 | | static constexpr int value = N; |
---|
1719 | | }; |
---|
1720 | | |
---|
1721 | | answer<1> f(int&) { return answer<1>(); } |
---|
1722 | | answer<2> f(const int&) { return answer<2>(); } |
---|
1723 | | answer<3> f(int&&) { return answer<3>(); } |
---|
1724 | | |
---|
1725 | | void |
---|
1726 | | test() |
---|
1727 | | { |
---|
1728 | | int i = 0; |
---|
1729 | | const int c = 0; |
---|
1730 | | static_assert(decltype(f(i))::value == 1, ""); |
---|
1731 | | static_assert(decltype(f(c))::value == 2, ""); |
---|
1732 | | static_assert(decltype(f(0))::value == 3, ""); |
---|
1733 | | } |
---|
1734 | | |
---|
1735 | | } |
---|
1736 | | |
---|
1737 | | namespace test_uniform_initialization |
---|
1738 | | { |
---|
1739 | | |
---|
1740 | | struct test |
---|
1741 | | { |
---|
1742 | | static const int zero {}; |
---|
1743 | | static const int one {1}; |
---|
1744 | | }; |
---|
1745 | | |
---|
1746 | | static_assert(test::zero == 0, ""); |
---|
1747 | | static_assert(test::one == 1, ""); |
---|
1748 | | |
---|
1749 | | } |
---|
1750 | | |
---|
1751 | | namespace test_lambdas |
---|
1752 | | { |
---|
1753 | | |
---|
1754 | | void |
---|
1755 | | test1() |
---|
1756 | | { |
---|
1757 | | auto lambda1 = [](){}; |
---|
1758 | | auto lambda2 = lambda1; |
---|
1759 | | lambda1(); |
---|
1760 | | lambda2(); |
---|
1761 | | } |
---|
1762 | | |
---|
1763 | | int |
---|
1764 | | test2() |
---|
1765 | | { |
---|
1766 | | auto a = [](int i, int j){ return i + j; }(1, 2); |
---|
1767 | | auto b = []() -> int { return '0'; }(); |
---|
1768 | | auto c = [=](){ return a + b; }(); |
---|
1769 | | auto d = [&](){ return c; }(); |
---|
1770 | | auto e = [a, &b](int x) mutable { |
---|
1771 | | const auto identity = [](int y){ return y; }; |
---|
1772 | | for (auto i = 0; i < a; ++i) |
---|
1773 | | a += b--; |
---|
1774 | | return x + identity(a + b); |
---|
1775 | | }(0); |
---|
1776 | | return a + b + c + d + e; |
---|
1777 | | } |
---|
1778 | | |
---|
1779 | | int |
---|
1780 | | test3() |
---|
1781 | | { |
---|
1782 | | const auto nullary = [](){ return 0; }; |
---|
1783 | | const auto unary = [](int x){ return x; }; |
---|
1784 | | using nullary_t = decltype(nullary); |
---|
1785 | | using unary_t = decltype(unary); |
---|
1786 | | const auto higher1st = [](nullary_t f){ return f(); }; |
---|
1787 | | const auto higher2nd = [unary](nullary_t f1){ |
---|
1788 | | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
---|
1789 | | }; |
---|
1790 | | return higher1st(nullary) + higher2nd(nullary)(unary); |
---|
1791 | | } |
---|
1792 | | |
---|
1793 | | } |
---|
1794 | | |
---|
1795 | | namespace test_variadic_templates |
---|
1796 | | { |
---|
1797 | | |
---|
1798 | | template <int...> |
---|
1799 | | struct sum; |
---|
1800 | | |
---|
1801 | | template <int N0, int... N1toN> |
---|
1802 | | struct sum<N0, N1toN...> |
---|
1803 | | { |
---|
1804 | | static constexpr auto value = N0 + sum<N1toN...>::value; |
---|
1805 | | }; |
---|
1806 | | |
---|
1807 | | template <> |
---|
1808 | | struct sum<> |
---|
1809 | | { |
---|
1810 | | static constexpr auto value = 0; |
---|
1811 | | }; |
---|
1812 | | |
---|
1813 | | static_assert(sum<>::value == 0, ""); |
---|
1814 | | static_assert(sum<1>::value == 1, ""); |
---|
1815 | | static_assert(sum<23>::value == 23, ""); |
---|
1816 | | static_assert(sum<1, 2>::value == 3, ""); |
---|
1817 | | static_assert(sum<5, 5, 11>::value == 21, ""); |
---|
1818 | | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
---|
1819 | | |
---|
1820 | | } |
---|
1821 | | |
---|
1822 | | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
---|
1823 | | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
---|
1824 | | // because of this. |
---|
1825 | | namespace test_template_alias_sfinae |
---|
1826 | | { |
---|
1827 | | |
---|
1828 | | struct foo {}; |
---|
1829 | | |
---|
1830 | | template<typename T> |
---|
1831 | | using member = typename T::member_type; |
---|
1832 | | |
---|
1833 | | template<typename T> |
---|
1834 | | void func(...) {} |
---|
1835 | | |
---|
1836 | | template<typename T> |
---|
1837 | | void func(member<T>*) {} |
---|
1838 | | |
---|
1839 | | void test(); |
---|
1840 | | |
---|
1841 | | void test() { func<foo>(0); } |
---|
1842 | | |
---|
1843 | | } |
---|
1844 | | |
---|
1845 | | } // namespace cxx11 |
---|
1846 | | |
---|
1847 | | #endif // __cplusplus >= 201103L |
---|
1848 | | |
---|
1849 | | |
---|
1850 | | |
---|
1851 | | |
---|
1852 | | // If the compiler admits that it is not ready for C++14, why torture it? |
---|
1853 | | // Hopefully, this will speed up the test. |
---|
1854 | | |
---|
1855 | | #ifndef __cplusplus |
---|
1856 | | |
---|
1857 | | #error "This is not a C++ compiler" |
---|
1858 | | |
---|
1859 | | #elif __cplusplus < 201402L |
---|
1860 | | |
---|
1861 | | #error "This is not a C++14 compiler" |
---|
1862 | | |
---|
1863 | | #else |
---|
1864 | | |
---|
1865 | | namespace cxx14 |
---|
1866 | | { |
---|
1867 | | |
---|
1868 | | namespace test_polymorphic_lambdas |
---|
1869 | | { |
---|
1870 | | |
---|
1871 | | int |
---|
1872 | | test() |
---|
1873 | | { |
---|
1874 | | const auto lambda = [](auto&&... args){ |
---|
1875 | | const auto istiny = [](auto x){ |
---|
1876 | | return (sizeof(x) == 1UL) ? 1 : 0; |
---|
1877 | | }; |
---|
1878 | | const int aretiny[] = { istiny(args)... }; |
---|
1879 | | return aretiny[0]; |
---|
1880 | | }; |
---|
1881 | | return lambda(1, 1L, 1.0f, '1'); |
---|
1882 | | } |
---|
1883 | | |
---|
1884 | | } |
---|
1885 | | |
---|
1886 | | namespace test_binary_literals |
---|
1887 | | { |
---|
1888 | | |
---|
1889 | | constexpr auto ivii = 0b0000000000101010; |
---|
1890 | | static_assert(ivii == 42, "wrong value"); |
---|
1891 | | |
---|
1892 | | } |
---|
1893 | | |
---|
1894 | | namespace test_generalized_constexpr |
---|
1895 | | { |
---|
1896 | | |
---|
1897 | | template < typename CharT > |
---|
1898 | | constexpr unsigned long |
---|
1899 | | strlen_c(const CharT *const s) noexcept |
---|
1900 | | { |
---|
1901 | | auto length = 0UL; |
---|
1902 | | for (auto p = s; *p; ++p) |
---|
1903 | | ++length; |
---|
1904 | | return length; |
---|
1905 | | } |
---|
1906 | | |
---|
1907 | | static_assert(strlen_c("") == 0UL, ""); |
---|
1908 | | static_assert(strlen_c("x") == 1UL, ""); |
---|
1909 | | static_assert(strlen_c("test") == 4UL, ""); |
---|
1910 | | static_assert(strlen_c("another\0test") == 7UL, ""); |
---|
1911 | | |
---|
1912 | | } |
---|
1913 | | |
---|
1914 | | namespace test_lambda_init_capture |
---|
1915 | | { |
---|
1916 | | |
---|
1917 | | int |
---|
1918 | | test() |
---|
1919 | | { |
---|
1920 | | auto x = 0; |
---|
1921 | | const auto lambda1 = [a = x](int b){ return a + b; }; |
---|
1922 | | const auto lambda2 = [a = lambda1(x)](){ return a; }; |
---|
1923 | | return lambda2(); |
---|
1924 | | } |
---|
1925 | | |
---|
1926 | | } |
---|
1927 | | |
---|
1928 | | namespace test_digit_separators |
---|
1929 | | { |
---|
1930 | | |
---|
1931 | | constexpr auto ten_million = 100'000'000; |
---|
1932 | | static_assert(ten_million == 100000000, ""); |
---|
1933 | | |
---|
1934 | | } |
---|
1935 | | |
---|
1936 | | namespace test_return_type_deduction |
---|
1937 | | { |
---|
1938 | | |
---|
1939 | | auto f(int& x) { return x; } |
---|
1940 | | decltype(auto) g(int& x) { return x; } |
---|
1941 | | |
---|
1942 | | template < typename T1, typename T2 > |
---|
1943 | | struct is_same |
---|
1944 | | { |
---|
1945 | | static constexpr auto value = false; |
---|
1946 | | }; |
---|
1947 | | |
---|
1948 | | template < typename T > |
---|
1949 | | struct is_same<T, T> |
---|
1950 | | { |
---|
1951 | | static constexpr auto value = true; |
---|
1952 | | }; |
---|
1953 | | |
---|
1954 | | int |
---|
1955 | | test() |
---|
1956 | | { |
---|
1957 | | auto x = 0; |
---|
1958 | | static_assert(is_same<int, decltype(f(x))>::value, ""); |
---|
1959 | | static_assert(is_same<int&, decltype(g(x))>::value, ""); |
---|
1960 | | return x; |
---|
1961 | | } |
---|
1962 | | |
---|
1963 | | } |
---|
1964 | | |
---|
1965 | | } // namespace cxx14 |
---|
1966 | | |
---|
1967 | | #endif // __cplusplus >= 201402L |
---|
1968 | | |
---|
1969 | | |
---|
1970 | | |
---|
1971 | configure:7736: result: no |
---|
1972 | configure:7311: checking whether /usr/bin/clang++ supports C++14 features with +std=c++14 |
---|
1973 | configure:7727: /usr/bin/clang++ +std=c++14 -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
1974 | clang: error: no such file or directory: '+std=c++14' |
---|
1975 | configure:7727: $? = 1 |
---|
1976 | configure: failed program was: |
---|
1977 | | /* confdefs.h */ |
---|
1978 | | #define PACKAGE_NAME "GIMP" |
---|
1979 | | #define PACKAGE_TARNAME "gimp" |
---|
1980 | | #define PACKAGE_VERSION "2.10.0" |
---|
1981 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
1982 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
1983 | | #define PACKAGE_URL "" |
---|
1984 | | #define GETTEXT_PACKAGE "gimp20" |
---|
1985 | | /* end confdefs.h. */ |
---|
1986 | | |
---|
1987 | | |
---|
1988 | | // If the compiler admits that it is not ready for C++11, why torture it? |
---|
1989 | | // Hopefully, this will speed up the test. |
---|
1990 | | |
---|
1991 | | #ifndef __cplusplus |
---|
1992 | | |
---|
1993 | | #error "This is not a C++ compiler" |
---|
1994 | | |
---|
1995 | | #elif __cplusplus < 201103L |
---|
1996 | | |
---|
1997 | | #error "This is not a C++11 compiler" |
---|
1998 | | |
---|
1999 | | #else |
---|
2000 | | |
---|
2001 | | namespace cxx11 |
---|
2002 | | { |
---|
2003 | | |
---|
2004 | | namespace test_static_assert |
---|
2005 | | { |
---|
2006 | | |
---|
2007 | | template <typename T> |
---|
2008 | | struct check |
---|
2009 | | { |
---|
2010 | | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
---|
2011 | | }; |
---|
2012 | | |
---|
2013 | | } |
---|
2014 | | |
---|
2015 | | namespace test_final_override |
---|
2016 | | { |
---|
2017 | | |
---|
2018 | | struct Base |
---|
2019 | | { |
---|
2020 | | virtual void f() {} |
---|
2021 | | }; |
---|
2022 | | |
---|
2023 | | struct Derived : public Base |
---|
2024 | | { |
---|
2025 | | virtual void f() override {} |
---|
2026 | | }; |
---|
2027 | | |
---|
2028 | | } |
---|
2029 | | |
---|
2030 | | namespace test_double_right_angle_brackets |
---|
2031 | | { |
---|
2032 | | |
---|
2033 | | template < typename T > |
---|
2034 | | struct check {}; |
---|
2035 | | |
---|
2036 | | typedef check<void> single_type; |
---|
2037 | | typedef check<check<void>> double_type; |
---|
2038 | | typedef check<check<check<void>>> triple_type; |
---|
2039 | | typedef check<check<check<check<void>>>> quadruple_type; |
---|
2040 | | |
---|
2041 | | } |
---|
2042 | | |
---|
2043 | | namespace test_decltype |
---|
2044 | | { |
---|
2045 | | |
---|
2046 | | int |
---|
2047 | | f() |
---|
2048 | | { |
---|
2049 | | int a = 1; |
---|
2050 | | decltype(a) b = 2; |
---|
2051 | | return a + b; |
---|
2052 | | } |
---|
2053 | | |
---|
2054 | | } |
---|
2055 | | |
---|
2056 | | namespace test_type_deduction |
---|
2057 | | { |
---|
2058 | | |
---|
2059 | | template < typename T1, typename T2 > |
---|
2060 | | struct is_same |
---|
2061 | | { |
---|
2062 | | static const bool value = false; |
---|
2063 | | }; |
---|
2064 | | |
---|
2065 | | template < typename T > |
---|
2066 | | struct is_same<T, T> |
---|
2067 | | { |
---|
2068 | | static const bool value = true; |
---|
2069 | | }; |
---|
2070 | | |
---|
2071 | | template < typename T1, typename T2 > |
---|
2072 | | auto |
---|
2073 | | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
---|
2074 | | { |
---|
2075 | | return a1 + a2; |
---|
2076 | | } |
---|
2077 | | |
---|
2078 | | int |
---|
2079 | | test(const int c, volatile int v) |
---|
2080 | | { |
---|
2081 | | static_assert(is_same<int, decltype(0)>::value == true, ""); |
---|
2082 | | static_assert(is_same<int, decltype(c)>::value == false, ""); |
---|
2083 | | static_assert(is_same<int, decltype(v)>::value == false, ""); |
---|
2084 | | auto ac = c; |
---|
2085 | | auto av = v; |
---|
2086 | | auto sumi = ac + av + 'x'; |
---|
2087 | | auto sumf = ac + av + 1.0; |
---|
2088 | | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
---|
2089 | | static_assert(is_same<int, decltype(av)>::value == true, ""); |
---|
2090 | | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
---|
2091 | | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
---|
2092 | | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
---|
2093 | | return (sumf > 0.0) ? sumi : add(c, v); |
---|
2094 | | } |
---|
2095 | | |
---|
2096 | | } |
---|
2097 | | |
---|
2098 | | namespace test_noexcept |
---|
2099 | | { |
---|
2100 | | |
---|
2101 | | int f() { return 0; } |
---|
2102 | | int g() noexcept { return 0; } |
---|
2103 | | |
---|
2104 | | static_assert(noexcept(f()) == false, ""); |
---|
2105 | | static_assert(noexcept(g()) == true, ""); |
---|
2106 | | |
---|
2107 | | } |
---|
2108 | | |
---|
2109 | | namespace test_constexpr |
---|
2110 | | { |
---|
2111 | | |
---|
2112 | | template < typename CharT > |
---|
2113 | | unsigned long constexpr |
---|
2114 | | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
---|
2115 | | { |
---|
2116 | | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
---|
2117 | | } |
---|
2118 | | |
---|
2119 | | template < typename CharT > |
---|
2120 | | unsigned long constexpr |
---|
2121 | | strlen_c(const CharT *const s) noexcept |
---|
2122 | | { |
---|
2123 | | return strlen_c_r(s, 0UL); |
---|
2124 | | } |
---|
2125 | | |
---|
2126 | | static_assert(strlen_c("") == 0UL, ""); |
---|
2127 | | static_assert(strlen_c("1") == 1UL, ""); |
---|
2128 | | static_assert(strlen_c("example") == 7UL, ""); |
---|
2129 | | static_assert(strlen_c("another\0example") == 7UL, ""); |
---|
2130 | | |
---|
2131 | | } |
---|
2132 | | |
---|
2133 | | namespace test_rvalue_references |
---|
2134 | | { |
---|
2135 | | |
---|
2136 | | template < int N > |
---|
2137 | | struct answer |
---|
2138 | | { |
---|
2139 | | static constexpr int value = N; |
---|
2140 | | }; |
---|
2141 | | |
---|
2142 | | answer<1> f(int&) { return answer<1>(); } |
---|
2143 | | answer<2> f(const int&) { return answer<2>(); } |
---|
2144 | | answer<3> f(int&&) { return answer<3>(); } |
---|
2145 | | |
---|
2146 | | void |
---|
2147 | | test() |
---|
2148 | | { |
---|
2149 | | int i = 0; |
---|
2150 | | const int c = 0; |
---|
2151 | | static_assert(decltype(f(i))::value == 1, ""); |
---|
2152 | | static_assert(decltype(f(c))::value == 2, ""); |
---|
2153 | | static_assert(decltype(f(0))::value == 3, ""); |
---|
2154 | | } |
---|
2155 | | |
---|
2156 | | } |
---|
2157 | | |
---|
2158 | | namespace test_uniform_initialization |
---|
2159 | | { |
---|
2160 | | |
---|
2161 | | struct test |
---|
2162 | | { |
---|
2163 | | static const int zero {}; |
---|
2164 | | static const int one {1}; |
---|
2165 | | }; |
---|
2166 | | |
---|
2167 | | static_assert(test::zero == 0, ""); |
---|
2168 | | static_assert(test::one == 1, ""); |
---|
2169 | | |
---|
2170 | | } |
---|
2171 | | |
---|
2172 | | namespace test_lambdas |
---|
2173 | | { |
---|
2174 | | |
---|
2175 | | void |
---|
2176 | | test1() |
---|
2177 | | { |
---|
2178 | | auto lambda1 = [](){}; |
---|
2179 | | auto lambda2 = lambda1; |
---|
2180 | | lambda1(); |
---|
2181 | | lambda2(); |
---|
2182 | | } |
---|
2183 | | |
---|
2184 | | int |
---|
2185 | | test2() |
---|
2186 | | { |
---|
2187 | | auto a = [](int i, int j){ return i + j; }(1, 2); |
---|
2188 | | auto b = []() -> int { return '0'; }(); |
---|
2189 | | auto c = [=](){ return a + b; }(); |
---|
2190 | | auto d = [&](){ return c; }(); |
---|
2191 | | auto e = [a, &b](int x) mutable { |
---|
2192 | | const auto identity = [](int y){ return y; }; |
---|
2193 | | for (auto i = 0; i < a; ++i) |
---|
2194 | | a += b--; |
---|
2195 | | return x + identity(a + b); |
---|
2196 | | }(0); |
---|
2197 | | return a + b + c + d + e; |
---|
2198 | | } |
---|
2199 | | |
---|
2200 | | int |
---|
2201 | | test3() |
---|
2202 | | { |
---|
2203 | | const auto nullary = [](){ return 0; }; |
---|
2204 | | const auto unary = [](int x){ return x; }; |
---|
2205 | | using nullary_t = decltype(nullary); |
---|
2206 | | using unary_t = decltype(unary); |
---|
2207 | | const auto higher1st = [](nullary_t f){ return f(); }; |
---|
2208 | | const auto higher2nd = [unary](nullary_t f1){ |
---|
2209 | | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
---|
2210 | | }; |
---|
2211 | | return higher1st(nullary) + higher2nd(nullary)(unary); |
---|
2212 | | } |
---|
2213 | | |
---|
2214 | | } |
---|
2215 | | |
---|
2216 | | namespace test_variadic_templates |
---|
2217 | | { |
---|
2218 | | |
---|
2219 | | template <int...> |
---|
2220 | | struct sum; |
---|
2221 | | |
---|
2222 | | template <int N0, int... N1toN> |
---|
2223 | | struct sum<N0, N1toN...> |
---|
2224 | | { |
---|
2225 | | static constexpr auto value = N0 + sum<N1toN...>::value; |
---|
2226 | | }; |
---|
2227 | | |
---|
2228 | | template <> |
---|
2229 | | struct sum<> |
---|
2230 | | { |
---|
2231 | | static constexpr auto value = 0; |
---|
2232 | | }; |
---|
2233 | | |
---|
2234 | | static_assert(sum<>::value == 0, ""); |
---|
2235 | | static_assert(sum<1>::value == 1, ""); |
---|
2236 | | static_assert(sum<23>::value == 23, ""); |
---|
2237 | | static_assert(sum<1, 2>::value == 3, ""); |
---|
2238 | | static_assert(sum<5, 5, 11>::value == 21, ""); |
---|
2239 | | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
---|
2240 | | |
---|
2241 | | } |
---|
2242 | | |
---|
2243 | | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
---|
2244 | | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
---|
2245 | | // because of this. |
---|
2246 | | namespace test_template_alias_sfinae |
---|
2247 | | { |
---|
2248 | | |
---|
2249 | | struct foo {}; |
---|
2250 | | |
---|
2251 | | template<typename T> |
---|
2252 | | using member = typename T::member_type; |
---|
2253 | | |
---|
2254 | | template<typename T> |
---|
2255 | | void func(...) {} |
---|
2256 | | |
---|
2257 | | template<typename T> |
---|
2258 | | void func(member<T>*) {} |
---|
2259 | | |
---|
2260 | | void test(); |
---|
2261 | | |
---|
2262 | | void test() { func<foo>(0); } |
---|
2263 | | |
---|
2264 | | } |
---|
2265 | | |
---|
2266 | | } // namespace cxx11 |
---|
2267 | | |
---|
2268 | | #endif // __cplusplus >= 201103L |
---|
2269 | | |
---|
2270 | | |
---|
2271 | | |
---|
2272 | | |
---|
2273 | | // If the compiler admits that it is not ready for C++14, why torture it? |
---|
2274 | | // Hopefully, this will speed up the test. |
---|
2275 | | |
---|
2276 | | #ifndef __cplusplus |
---|
2277 | | |
---|
2278 | | #error "This is not a C++ compiler" |
---|
2279 | | |
---|
2280 | | #elif __cplusplus < 201402L |
---|
2281 | | |
---|
2282 | | #error "This is not a C++14 compiler" |
---|
2283 | | |
---|
2284 | | #else |
---|
2285 | | |
---|
2286 | | namespace cxx14 |
---|
2287 | | { |
---|
2288 | | |
---|
2289 | | namespace test_polymorphic_lambdas |
---|
2290 | | { |
---|
2291 | | |
---|
2292 | | int |
---|
2293 | | test() |
---|
2294 | | { |
---|
2295 | | const auto lambda = [](auto&&... args){ |
---|
2296 | | const auto istiny = [](auto x){ |
---|
2297 | | return (sizeof(x) == 1UL) ? 1 : 0; |
---|
2298 | | }; |
---|
2299 | | const int aretiny[] = { istiny(args)... }; |
---|
2300 | | return aretiny[0]; |
---|
2301 | | }; |
---|
2302 | | return lambda(1, 1L, 1.0f, '1'); |
---|
2303 | | } |
---|
2304 | | |
---|
2305 | | } |
---|
2306 | | |
---|
2307 | | namespace test_binary_literals |
---|
2308 | | { |
---|
2309 | | |
---|
2310 | | constexpr auto ivii = 0b0000000000101010; |
---|
2311 | | static_assert(ivii == 42, "wrong value"); |
---|
2312 | | |
---|
2313 | | } |
---|
2314 | | |
---|
2315 | | namespace test_generalized_constexpr |
---|
2316 | | { |
---|
2317 | | |
---|
2318 | | template < typename CharT > |
---|
2319 | | constexpr unsigned long |
---|
2320 | | strlen_c(const CharT *const s) noexcept |
---|
2321 | | { |
---|
2322 | | auto length = 0UL; |
---|
2323 | | for (auto p = s; *p; ++p) |
---|
2324 | | ++length; |
---|
2325 | | return length; |
---|
2326 | | } |
---|
2327 | | |
---|
2328 | | static_assert(strlen_c("") == 0UL, ""); |
---|
2329 | | static_assert(strlen_c("x") == 1UL, ""); |
---|
2330 | | static_assert(strlen_c("test") == 4UL, ""); |
---|
2331 | | static_assert(strlen_c("another\0test") == 7UL, ""); |
---|
2332 | | |
---|
2333 | | } |
---|
2334 | | |
---|
2335 | | namespace test_lambda_init_capture |
---|
2336 | | { |
---|
2337 | | |
---|
2338 | | int |
---|
2339 | | test() |
---|
2340 | | { |
---|
2341 | | auto x = 0; |
---|
2342 | | const auto lambda1 = [a = x](int b){ return a + b; }; |
---|
2343 | | const auto lambda2 = [a = lambda1(x)](){ return a; }; |
---|
2344 | | return lambda2(); |
---|
2345 | | } |
---|
2346 | | |
---|
2347 | | } |
---|
2348 | | |
---|
2349 | | namespace test_digit_separators |
---|
2350 | | { |
---|
2351 | | |
---|
2352 | | constexpr auto ten_million = 100'000'000; |
---|
2353 | | static_assert(ten_million == 100000000, ""); |
---|
2354 | | |
---|
2355 | | } |
---|
2356 | | |
---|
2357 | | namespace test_return_type_deduction |
---|
2358 | | { |
---|
2359 | | |
---|
2360 | | auto f(int& x) { return x; } |
---|
2361 | | decltype(auto) g(int& x) { return x; } |
---|
2362 | | |
---|
2363 | | template < typename T1, typename T2 > |
---|
2364 | | struct is_same |
---|
2365 | | { |
---|
2366 | | static constexpr auto value = false; |
---|
2367 | | }; |
---|
2368 | | |
---|
2369 | | template < typename T > |
---|
2370 | | struct is_same<T, T> |
---|
2371 | | { |
---|
2372 | | static constexpr auto value = true; |
---|
2373 | | }; |
---|
2374 | | |
---|
2375 | | int |
---|
2376 | | test() |
---|
2377 | | { |
---|
2378 | | auto x = 0; |
---|
2379 | | static_assert(is_same<int, decltype(f(x))>::value, ""); |
---|
2380 | | static_assert(is_same<int&, decltype(g(x))>::value, ""); |
---|
2381 | | return x; |
---|
2382 | | } |
---|
2383 | | |
---|
2384 | | } |
---|
2385 | | |
---|
2386 | | } // namespace cxx14 |
---|
2387 | | |
---|
2388 | | #endif // __cplusplus >= 201402L |
---|
2389 | | |
---|
2390 | | |
---|
2391 | | |
---|
2392 | configure:7736: result: no |
---|
2393 | configure:7311: checking whether /usr/bin/clang++ supports C++14 features with -h std=c++14 |
---|
2394 | configure:7727: /usr/bin/clang++ -h std=c++14 -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
2395 | clang: error: unknown argument: '-h' |
---|
2396 | clang: error: no such file or directory: 'std=c++14' |
---|
2397 | configure:7727: $? = 1 |
---|
2398 | configure: failed program was: |
---|
2399 | | /* confdefs.h */ |
---|
2400 | | #define PACKAGE_NAME "GIMP" |
---|
2401 | | #define PACKAGE_TARNAME "gimp" |
---|
2402 | | #define PACKAGE_VERSION "2.10.0" |
---|
2403 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
2404 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
2405 | | #define PACKAGE_URL "" |
---|
2406 | | #define GETTEXT_PACKAGE "gimp20" |
---|
2407 | | /* end confdefs.h. */ |
---|
2408 | | |
---|
2409 | | |
---|
2410 | | // If the compiler admits that it is not ready for C++11, why torture it? |
---|
2411 | | // Hopefully, this will speed up the test. |
---|
2412 | | |
---|
2413 | | #ifndef __cplusplus |
---|
2414 | | |
---|
2415 | | #error "This is not a C++ compiler" |
---|
2416 | | |
---|
2417 | | #elif __cplusplus < 201103L |
---|
2418 | | |
---|
2419 | | #error "This is not a C++11 compiler" |
---|
2420 | | |
---|
2421 | | #else |
---|
2422 | | |
---|
2423 | | namespace cxx11 |
---|
2424 | | { |
---|
2425 | | |
---|
2426 | | namespace test_static_assert |
---|
2427 | | { |
---|
2428 | | |
---|
2429 | | template <typename T> |
---|
2430 | | struct check |
---|
2431 | | { |
---|
2432 | | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
---|
2433 | | }; |
---|
2434 | | |
---|
2435 | | } |
---|
2436 | | |
---|
2437 | | namespace test_final_override |
---|
2438 | | { |
---|
2439 | | |
---|
2440 | | struct Base |
---|
2441 | | { |
---|
2442 | | virtual void f() {} |
---|
2443 | | }; |
---|
2444 | | |
---|
2445 | | struct Derived : public Base |
---|
2446 | | { |
---|
2447 | | virtual void f() override {} |
---|
2448 | | }; |
---|
2449 | | |
---|
2450 | | } |
---|
2451 | | |
---|
2452 | | namespace test_double_right_angle_brackets |
---|
2453 | | { |
---|
2454 | | |
---|
2455 | | template < typename T > |
---|
2456 | | struct check {}; |
---|
2457 | | |
---|
2458 | | typedef check<void> single_type; |
---|
2459 | | typedef check<check<void>> double_type; |
---|
2460 | | typedef check<check<check<void>>> triple_type; |
---|
2461 | | typedef check<check<check<check<void>>>> quadruple_type; |
---|
2462 | | |
---|
2463 | | } |
---|
2464 | | |
---|
2465 | | namespace test_decltype |
---|
2466 | | { |
---|
2467 | | |
---|
2468 | | int |
---|
2469 | | f() |
---|
2470 | | { |
---|
2471 | | int a = 1; |
---|
2472 | | decltype(a) b = 2; |
---|
2473 | | return a + b; |
---|
2474 | | } |
---|
2475 | | |
---|
2476 | | } |
---|
2477 | | |
---|
2478 | | namespace test_type_deduction |
---|
2479 | | { |
---|
2480 | | |
---|
2481 | | template < typename T1, typename T2 > |
---|
2482 | | struct is_same |
---|
2483 | | { |
---|
2484 | | static const bool value = false; |
---|
2485 | | }; |
---|
2486 | | |
---|
2487 | | template < typename T > |
---|
2488 | | struct is_same<T, T> |
---|
2489 | | { |
---|
2490 | | static const bool value = true; |
---|
2491 | | }; |
---|
2492 | | |
---|
2493 | | template < typename T1, typename T2 > |
---|
2494 | | auto |
---|
2495 | | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
---|
2496 | | { |
---|
2497 | | return a1 + a2; |
---|
2498 | | } |
---|
2499 | | |
---|
2500 | | int |
---|
2501 | | test(const int c, volatile int v) |
---|
2502 | | { |
---|
2503 | | static_assert(is_same<int, decltype(0)>::value == true, ""); |
---|
2504 | | static_assert(is_same<int, decltype(c)>::value == false, ""); |
---|
2505 | | static_assert(is_same<int, decltype(v)>::value == false, ""); |
---|
2506 | | auto ac = c; |
---|
2507 | | auto av = v; |
---|
2508 | | auto sumi = ac + av + 'x'; |
---|
2509 | | auto sumf = ac + av + 1.0; |
---|
2510 | | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
---|
2511 | | static_assert(is_same<int, decltype(av)>::value == true, ""); |
---|
2512 | | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
---|
2513 | | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
---|
2514 | | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
---|
2515 | | return (sumf > 0.0) ? sumi : add(c, v); |
---|
2516 | | } |
---|
2517 | | |
---|
2518 | | } |
---|
2519 | | |
---|
2520 | | namespace test_noexcept |
---|
2521 | | { |
---|
2522 | | |
---|
2523 | | int f() { return 0; } |
---|
2524 | | int g() noexcept { return 0; } |
---|
2525 | | |
---|
2526 | | static_assert(noexcept(f()) == false, ""); |
---|
2527 | | static_assert(noexcept(g()) == true, ""); |
---|
2528 | | |
---|
2529 | | } |
---|
2530 | | |
---|
2531 | | namespace test_constexpr |
---|
2532 | | { |
---|
2533 | | |
---|
2534 | | template < typename CharT > |
---|
2535 | | unsigned long constexpr |
---|
2536 | | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
---|
2537 | | { |
---|
2538 | | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
---|
2539 | | } |
---|
2540 | | |
---|
2541 | | template < typename CharT > |
---|
2542 | | unsigned long constexpr |
---|
2543 | | strlen_c(const CharT *const s) noexcept |
---|
2544 | | { |
---|
2545 | | return strlen_c_r(s, 0UL); |
---|
2546 | | } |
---|
2547 | | |
---|
2548 | | static_assert(strlen_c("") == 0UL, ""); |
---|
2549 | | static_assert(strlen_c("1") == 1UL, ""); |
---|
2550 | | static_assert(strlen_c("example") == 7UL, ""); |
---|
2551 | | static_assert(strlen_c("another\0example") == 7UL, ""); |
---|
2552 | | |
---|
2553 | | } |
---|
2554 | | |
---|
2555 | | namespace test_rvalue_references |
---|
2556 | | { |
---|
2557 | | |
---|
2558 | | template < int N > |
---|
2559 | | struct answer |
---|
2560 | | { |
---|
2561 | | static constexpr int value = N; |
---|
2562 | | }; |
---|
2563 | | |
---|
2564 | | answer<1> f(int&) { return answer<1>(); } |
---|
2565 | | answer<2> f(const int&) { return answer<2>(); } |
---|
2566 | | answer<3> f(int&&) { return answer<3>(); } |
---|
2567 | | |
---|
2568 | | void |
---|
2569 | | test() |
---|
2570 | | { |
---|
2571 | | int i = 0; |
---|
2572 | | const int c = 0; |
---|
2573 | | static_assert(decltype(f(i))::value == 1, ""); |
---|
2574 | | static_assert(decltype(f(c))::value == 2, ""); |
---|
2575 | | static_assert(decltype(f(0))::value == 3, ""); |
---|
2576 | | } |
---|
2577 | | |
---|
2578 | | } |
---|
2579 | | |
---|
2580 | | namespace test_uniform_initialization |
---|
2581 | | { |
---|
2582 | | |
---|
2583 | | struct test |
---|
2584 | | { |
---|
2585 | | static const int zero {}; |
---|
2586 | | static const int one {1}; |
---|
2587 | | }; |
---|
2588 | | |
---|
2589 | | static_assert(test::zero == 0, ""); |
---|
2590 | | static_assert(test::one == 1, ""); |
---|
2591 | | |
---|
2592 | | } |
---|
2593 | | |
---|
2594 | | namespace test_lambdas |
---|
2595 | | { |
---|
2596 | | |
---|
2597 | | void |
---|
2598 | | test1() |
---|
2599 | | { |
---|
2600 | | auto lambda1 = [](){}; |
---|
2601 | | auto lambda2 = lambda1; |
---|
2602 | | lambda1(); |
---|
2603 | | lambda2(); |
---|
2604 | | } |
---|
2605 | | |
---|
2606 | | int |
---|
2607 | | test2() |
---|
2608 | | { |
---|
2609 | | auto a = [](int i, int j){ return i + j; }(1, 2); |
---|
2610 | | auto b = []() -> int { return '0'; }(); |
---|
2611 | | auto c = [=](){ return a + b; }(); |
---|
2612 | | auto d = [&](){ return c; }(); |
---|
2613 | | auto e = [a, &b](int x) mutable { |
---|
2614 | | const auto identity = [](int y){ return y; }; |
---|
2615 | | for (auto i = 0; i < a; ++i) |
---|
2616 | | a += b--; |
---|
2617 | | return x + identity(a + b); |
---|
2618 | | }(0); |
---|
2619 | | return a + b + c + d + e; |
---|
2620 | | } |
---|
2621 | | |
---|
2622 | | int |
---|
2623 | | test3() |
---|
2624 | | { |
---|
2625 | | const auto nullary = [](){ return 0; }; |
---|
2626 | | const auto unary = [](int x){ return x; }; |
---|
2627 | | using nullary_t = decltype(nullary); |
---|
2628 | | using unary_t = decltype(unary); |
---|
2629 | | const auto higher1st = [](nullary_t f){ return f(); }; |
---|
2630 | | const auto higher2nd = [unary](nullary_t f1){ |
---|
2631 | | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
---|
2632 | | }; |
---|
2633 | | return higher1st(nullary) + higher2nd(nullary)(unary); |
---|
2634 | | } |
---|
2635 | | |
---|
2636 | | } |
---|
2637 | | |
---|
2638 | | namespace test_variadic_templates |
---|
2639 | | { |
---|
2640 | | |
---|
2641 | | template <int...> |
---|
2642 | | struct sum; |
---|
2643 | | |
---|
2644 | | template <int N0, int... N1toN> |
---|
2645 | | struct sum<N0, N1toN...> |
---|
2646 | | { |
---|
2647 | | static constexpr auto value = N0 + sum<N1toN...>::value; |
---|
2648 | | }; |
---|
2649 | | |
---|
2650 | | template <> |
---|
2651 | | struct sum<> |
---|
2652 | | { |
---|
2653 | | static constexpr auto value = 0; |
---|
2654 | | }; |
---|
2655 | | |
---|
2656 | | static_assert(sum<>::value == 0, ""); |
---|
2657 | | static_assert(sum<1>::value == 1, ""); |
---|
2658 | | static_assert(sum<23>::value == 23, ""); |
---|
2659 | | static_assert(sum<1, 2>::value == 3, ""); |
---|
2660 | | static_assert(sum<5, 5, 11>::value == 21, ""); |
---|
2661 | | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
---|
2662 | | |
---|
2663 | | } |
---|
2664 | | |
---|
2665 | | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
---|
2666 | | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
---|
2667 | | // because of this. |
---|
2668 | | namespace test_template_alias_sfinae |
---|
2669 | | { |
---|
2670 | | |
---|
2671 | | struct foo {}; |
---|
2672 | | |
---|
2673 | | template<typename T> |
---|
2674 | | using member = typename T::member_type; |
---|
2675 | | |
---|
2676 | | template<typename T> |
---|
2677 | | void func(...) {} |
---|
2678 | | |
---|
2679 | | template<typename T> |
---|
2680 | | void func(member<T>*) {} |
---|
2681 | | |
---|
2682 | | void test(); |
---|
2683 | | |
---|
2684 | | void test() { func<foo>(0); } |
---|
2685 | | |
---|
2686 | | } |
---|
2687 | | |
---|
2688 | | } // namespace cxx11 |
---|
2689 | | |
---|
2690 | | #endif // __cplusplus >= 201103L |
---|
2691 | | |
---|
2692 | | |
---|
2693 | | |
---|
2694 | | |
---|
2695 | | // If the compiler admits that it is not ready for C++14, why torture it? |
---|
2696 | | // Hopefully, this will speed up the test. |
---|
2697 | | |
---|
2698 | | #ifndef __cplusplus |
---|
2699 | | |
---|
2700 | | #error "This is not a C++ compiler" |
---|
2701 | | |
---|
2702 | | #elif __cplusplus < 201402L |
---|
2703 | | |
---|
2704 | | #error "This is not a C++14 compiler" |
---|
2705 | | |
---|
2706 | | #else |
---|
2707 | | |
---|
2708 | | namespace cxx14 |
---|
2709 | | { |
---|
2710 | | |
---|
2711 | | namespace test_polymorphic_lambdas |
---|
2712 | | { |
---|
2713 | | |
---|
2714 | | int |
---|
2715 | | test() |
---|
2716 | | { |
---|
2717 | | const auto lambda = [](auto&&... args){ |
---|
2718 | | const auto istiny = [](auto x){ |
---|
2719 | | return (sizeof(x) == 1UL) ? 1 : 0; |
---|
2720 | | }; |
---|
2721 | | const int aretiny[] = { istiny(args)... }; |
---|
2722 | | return aretiny[0]; |
---|
2723 | | }; |
---|
2724 | | return lambda(1, 1L, 1.0f, '1'); |
---|
2725 | | } |
---|
2726 | | |
---|
2727 | | } |
---|
2728 | | |
---|
2729 | | namespace test_binary_literals |
---|
2730 | | { |
---|
2731 | | |
---|
2732 | | constexpr auto ivii = 0b0000000000101010; |
---|
2733 | | static_assert(ivii == 42, "wrong value"); |
---|
2734 | | |
---|
2735 | | } |
---|
2736 | | |
---|
2737 | | namespace test_generalized_constexpr |
---|
2738 | | { |
---|
2739 | | |
---|
2740 | | template < typename CharT > |
---|
2741 | | constexpr unsigned long |
---|
2742 | | strlen_c(const CharT *const s) noexcept |
---|
2743 | | { |
---|
2744 | | auto length = 0UL; |
---|
2745 | | for (auto p = s; *p; ++p) |
---|
2746 | | ++length; |
---|
2747 | | return length; |
---|
2748 | | } |
---|
2749 | | |
---|
2750 | | static_assert(strlen_c("") == 0UL, ""); |
---|
2751 | | static_assert(strlen_c("x") == 1UL, ""); |
---|
2752 | | static_assert(strlen_c("test") == 4UL, ""); |
---|
2753 | | static_assert(strlen_c("another\0test") == 7UL, ""); |
---|
2754 | | |
---|
2755 | | } |
---|
2756 | | |
---|
2757 | | namespace test_lambda_init_capture |
---|
2758 | | { |
---|
2759 | | |
---|
2760 | | int |
---|
2761 | | test() |
---|
2762 | | { |
---|
2763 | | auto x = 0; |
---|
2764 | | const auto lambda1 = [a = x](int b){ return a + b; }; |
---|
2765 | | const auto lambda2 = [a = lambda1(x)](){ return a; }; |
---|
2766 | | return lambda2(); |
---|
2767 | | } |
---|
2768 | | |
---|
2769 | | } |
---|
2770 | | |
---|
2771 | | namespace test_digit_separators |
---|
2772 | | { |
---|
2773 | | |
---|
2774 | | constexpr auto ten_million = 100'000'000; |
---|
2775 | | static_assert(ten_million == 100000000, ""); |
---|
2776 | | |
---|
2777 | | } |
---|
2778 | | |
---|
2779 | | namespace test_return_type_deduction |
---|
2780 | | { |
---|
2781 | | |
---|
2782 | | auto f(int& x) { return x; } |
---|
2783 | | decltype(auto) g(int& x) { return x; } |
---|
2784 | | |
---|
2785 | | template < typename T1, typename T2 > |
---|
2786 | | struct is_same |
---|
2787 | | { |
---|
2788 | | static constexpr auto value = false; |
---|
2789 | | }; |
---|
2790 | | |
---|
2791 | | template < typename T > |
---|
2792 | | struct is_same<T, T> |
---|
2793 | | { |
---|
2794 | | static constexpr auto value = true; |
---|
2795 | | }; |
---|
2796 | | |
---|
2797 | | int |
---|
2798 | | test() |
---|
2799 | | { |
---|
2800 | | auto x = 0; |
---|
2801 | | static_assert(is_same<int, decltype(f(x))>::value, ""); |
---|
2802 | | static_assert(is_same<int&, decltype(g(x))>::value, ""); |
---|
2803 | | return x; |
---|
2804 | | } |
---|
2805 | | |
---|
2806 | | } |
---|
2807 | | |
---|
2808 | | } // namespace cxx14 |
---|
2809 | | |
---|
2810 | | #endif // __cplusplus >= 201402L |
---|
2811 | | |
---|
2812 | | |
---|
2813 | | |
---|
2814 | configure:7736: result: no |
---|
2815 | configure:7311: checking whether /usr/bin/clang++ supports C++14 features with -std=c++1y |
---|
2816 | configure:7727: /usr/bin/clang++ -std=c++1y -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
2817 | conftest.cpp:306:2: error: "This is not a C++14 compiler" |
---|
2818 | #error "This is not a C++14 compiler" |
---|
2819 | ^ |
---|
2820 | 1 error generated. |
---|
2821 | configure:7727: $? = 1 |
---|
2822 | configure: failed program was: |
---|
2823 | | /* confdefs.h */ |
---|
2824 | | #define PACKAGE_NAME "GIMP" |
---|
2825 | | #define PACKAGE_TARNAME "gimp" |
---|
2826 | | #define PACKAGE_VERSION "2.10.0" |
---|
2827 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
2828 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
2829 | | #define PACKAGE_URL "" |
---|
2830 | | #define GETTEXT_PACKAGE "gimp20" |
---|
2831 | | /* end confdefs.h. */ |
---|
2832 | | |
---|
2833 | | |
---|
2834 | | // If the compiler admits that it is not ready for C++11, why torture it? |
---|
2835 | | // Hopefully, this will speed up the test. |
---|
2836 | | |
---|
2837 | | #ifndef __cplusplus |
---|
2838 | | |
---|
2839 | | #error "This is not a C++ compiler" |
---|
2840 | | |
---|
2841 | | #elif __cplusplus < 201103L |
---|
2842 | | |
---|
2843 | | #error "This is not a C++11 compiler" |
---|
2844 | | |
---|
2845 | | #else |
---|
2846 | | |
---|
2847 | | namespace cxx11 |
---|
2848 | | { |
---|
2849 | | |
---|
2850 | | namespace test_static_assert |
---|
2851 | | { |
---|
2852 | | |
---|
2853 | | template <typename T> |
---|
2854 | | struct check |
---|
2855 | | { |
---|
2856 | | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
---|
2857 | | }; |
---|
2858 | | |
---|
2859 | | } |
---|
2860 | | |
---|
2861 | | namespace test_final_override |
---|
2862 | | { |
---|
2863 | | |
---|
2864 | | struct Base |
---|
2865 | | { |
---|
2866 | | virtual void f() {} |
---|
2867 | | }; |
---|
2868 | | |
---|
2869 | | struct Derived : public Base |
---|
2870 | | { |
---|
2871 | | virtual void f() override {} |
---|
2872 | | }; |
---|
2873 | | |
---|
2874 | | } |
---|
2875 | | |
---|
2876 | | namespace test_double_right_angle_brackets |
---|
2877 | | { |
---|
2878 | | |
---|
2879 | | template < typename T > |
---|
2880 | | struct check {}; |
---|
2881 | | |
---|
2882 | | typedef check<void> single_type; |
---|
2883 | | typedef check<check<void>> double_type; |
---|
2884 | | typedef check<check<check<void>>> triple_type; |
---|
2885 | | typedef check<check<check<check<void>>>> quadruple_type; |
---|
2886 | | |
---|
2887 | | } |
---|
2888 | | |
---|
2889 | | namespace test_decltype |
---|
2890 | | { |
---|
2891 | | |
---|
2892 | | int |
---|
2893 | | f() |
---|
2894 | | { |
---|
2895 | | int a = 1; |
---|
2896 | | decltype(a) b = 2; |
---|
2897 | | return a + b; |
---|
2898 | | } |
---|
2899 | | |
---|
2900 | | } |
---|
2901 | | |
---|
2902 | | namespace test_type_deduction |
---|
2903 | | { |
---|
2904 | | |
---|
2905 | | template < typename T1, typename T2 > |
---|
2906 | | struct is_same |
---|
2907 | | { |
---|
2908 | | static const bool value = false; |
---|
2909 | | }; |
---|
2910 | | |
---|
2911 | | template < typename T > |
---|
2912 | | struct is_same<T, T> |
---|
2913 | | { |
---|
2914 | | static const bool value = true; |
---|
2915 | | }; |
---|
2916 | | |
---|
2917 | | template < typename T1, typename T2 > |
---|
2918 | | auto |
---|
2919 | | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
---|
2920 | | { |
---|
2921 | | return a1 + a2; |
---|
2922 | | } |
---|
2923 | | |
---|
2924 | | int |
---|
2925 | | test(const int c, volatile int v) |
---|
2926 | | { |
---|
2927 | | static_assert(is_same<int, decltype(0)>::value == true, ""); |
---|
2928 | | static_assert(is_same<int, decltype(c)>::value == false, ""); |
---|
2929 | | static_assert(is_same<int, decltype(v)>::value == false, ""); |
---|
2930 | | auto ac = c; |
---|
2931 | | auto av = v; |
---|
2932 | | auto sumi = ac + av + 'x'; |
---|
2933 | | auto sumf = ac + av + 1.0; |
---|
2934 | | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
---|
2935 | | static_assert(is_same<int, decltype(av)>::value == true, ""); |
---|
2936 | | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
---|
2937 | | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
---|
2938 | | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
---|
2939 | | return (sumf > 0.0) ? sumi : add(c, v); |
---|
2940 | | } |
---|
2941 | | |
---|
2942 | | } |
---|
2943 | | |
---|
2944 | | namespace test_noexcept |
---|
2945 | | { |
---|
2946 | | |
---|
2947 | | int f() { return 0; } |
---|
2948 | | int g() noexcept { return 0; } |
---|
2949 | | |
---|
2950 | | static_assert(noexcept(f()) == false, ""); |
---|
2951 | | static_assert(noexcept(g()) == true, ""); |
---|
2952 | | |
---|
2953 | | } |
---|
2954 | | |
---|
2955 | | namespace test_constexpr |
---|
2956 | | { |
---|
2957 | | |
---|
2958 | | template < typename CharT > |
---|
2959 | | unsigned long constexpr |
---|
2960 | | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
---|
2961 | | { |
---|
2962 | | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
---|
2963 | | } |
---|
2964 | | |
---|
2965 | | template < typename CharT > |
---|
2966 | | unsigned long constexpr |
---|
2967 | | strlen_c(const CharT *const s) noexcept |
---|
2968 | | { |
---|
2969 | | return strlen_c_r(s, 0UL); |
---|
2970 | | } |
---|
2971 | | |
---|
2972 | | static_assert(strlen_c("") == 0UL, ""); |
---|
2973 | | static_assert(strlen_c("1") == 1UL, ""); |
---|
2974 | | static_assert(strlen_c("example") == 7UL, ""); |
---|
2975 | | static_assert(strlen_c("another\0example") == 7UL, ""); |
---|
2976 | | |
---|
2977 | | } |
---|
2978 | | |
---|
2979 | | namespace test_rvalue_references |
---|
2980 | | { |
---|
2981 | | |
---|
2982 | | template < int N > |
---|
2983 | | struct answer |
---|
2984 | | { |
---|
2985 | | static constexpr int value = N; |
---|
2986 | | }; |
---|
2987 | | |
---|
2988 | | answer<1> f(int&) { return answer<1>(); } |
---|
2989 | | answer<2> f(const int&) { return answer<2>(); } |
---|
2990 | | answer<3> f(int&&) { return answer<3>(); } |
---|
2991 | | |
---|
2992 | | void |
---|
2993 | | test() |
---|
2994 | | { |
---|
2995 | | int i = 0; |
---|
2996 | | const int c = 0; |
---|
2997 | | static_assert(decltype(f(i))::value == 1, ""); |
---|
2998 | | static_assert(decltype(f(c))::value == 2, ""); |
---|
2999 | | static_assert(decltype(f(0))::value == 3, ""); |
---|
3000 | | } |
---|
3001 | | |
---|
3002 | | } |
---|
3003 | | |
---|
3004 | | namespace test_uniform_initialization |
---|
3005 | | { |
---|
3006 | | |
---|
3007 | | struct test |
---|
3008 | | { |
---|
3009 | | static const int zero {}; |
---|
3010 | | static const int one {1}; |
---|
3011 | | }; |
---|
3012 | | |
---|
3013 | | static_assert(test::zero == 0, ""); |
---|
3014 | | static_assert(test::one == 1, ""); |
---|
3015 | | |
---|
3016 | | } |
---|
3017 | | |
---|
3018 | | namespace test_lambdas |
---|
3019 | | { |
---|
3020 | | |
---|
3021 | | void |
---|
3022 | | test1() |
---|
3023 | | { |
---|
3024 | | auto lambda1 = [](){}; |
---|
3025 | | auto lambda2 = lambda1; |
---|
3026 | | lambda1(); |
---|
3027 | | lambda2(); |
---|
3028 | | } |
---|
3029 | | |
---|
3030 | | int |
---|
3031 | | test2() |
---|
3032 | | { |
---|
3033 | | auto a = [](int i, int j){ return i + j; }(1, 2); |
---|
3034 | | auto b = []() -> int { return '0'; }(); |
---|
3035 | | auto c = [=](){ return a + b; }(); |
---|
3036 | | auto d = [&](){ return c; }(); |
---|
3037 | | auto e = [a, &b](int x) mutable { |
---|
3038 | | const auto identity = [](int y){ return y; }; |
---|
3039 | | for (auto i = 0; i < a; ++i) |
---|
3040 | | a += b--; |
---|
3041 | | return x + identity(a + b); |
---|
3042 | | }(0); |
---|
3043 | | return a + b + c + d + e; |
---|
3044 | | } |
---|
3045 | | |
---|
3046 | | int |
---|
3047 | | test3() |
---|
3048 | | { |
---|
3049 | | const auto nullary = [](){ return 0; }; |
---|
3050 | | const auto unary = [](int x){ return x; }; |
---|
3051 | | using nullary_t = decltype(nullary); |
---|
3052 | | using unary_t = decltype(unary); |
---|
3053 | | const auto higher1st = [](nullary_t f){ return f(); }; |
---|
3054 | | const auto higher2nd = [unary](nullary_t f1){ |
---|
3055 | | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
---|
3056 | | }; |
---|
3057 | | return higher1st(nullary) + higher2nd(nullary)(unary); |
---|
3058 | | } |
---|
3059 | | |
---|
3060 | | } |
---|
3061 | | |
---|
3062 | | namespace test_variadic_templates |
---|
3063 | | { |
---|
3064 | | |
---|
3065 | | template <int...> |
---|
3066 | | struct sum; |
---|
3067 | | |
---|
3068 | | template <int N0, int... N1toN> |
---|
3069 | | struct sum<N0, N1toN...> |
---|
3070 | | { |
---|
3071 | | static constexpr auto value = N0 + sum<N1toN...>::value; |
---|
3072 | | }; |
---|
3073 | | |
---|
3074 | | template <> |
---|
3075 | | struct sum<> |
---|
3076 | | { |
---|
3077 | | static constexpr auto value = 0; |
---|
3078 | | }; |
---|
3079 | | |
---|
3080 | | static_assert(sum<>::value == 0, ""); |
---|
3081 | | static_assert(sum<1>::value == 1, ""); |
---|
3082 | | static_assert(sum<23>::value == 23, ""); |
---|
3083 | | static_assert(sum<1, 2>::value == 3, ""); |
---|
3084 | | static_assert(sum<5, 5, 11>::value == 21, ""); |
---|
3085 | | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
---|
3086 | | |
---|
3087 | | } |
---|
3088 | | |
---|
3089 | | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
---|
3090 | | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
---|
3091 | | // because of this. |
---|
3092 | | namespace test_template_alias_sfinae |
---|
3093 | | { |
---|
3094 | | |
---|
3095 | | struct foo {}; |
---|
3096 | | |
---|
3097 | | template<typename T> |
---|
3098 | | using member = typename T::member_type; |
---|
3099 | | |
---|
3100 | | template<typename T> |
---|
3101 | | void func(...) {} |
---|
3102 | | |
---|
3103 | | template<typename T> |
---|
3104 | | void func(member<T>*) {} |
---|
3105 | | |
---|
3106 | | void test(); |
---|
3107 | | |
---|
3108 | | void test() { func<foo>(0); } |
---|
3109 | | |
---|
3110 | | } |
---|
3111 | | |
---|
3112 | | } // namespace cxx11 |
---|
3113 | | |
---|
3114 | | #endif // __cplusplus >= 201103L |
---|
3115 | | |
---|
3116 | | |
---|
3117 | | |
---|
3118 | | |
---|
3119 | | // If the compiler admits that it is not ready for C++14, why torture it? |
---|
3120 | | // Hopefully, this will speed up the test. |
---|
3121 | | |
---|
3122 | | #ifndef __cplusplus |
---|
3123 | | |
---|
3124 | | #error "This is not a C++ compiler" |
---|
3125 | | |
---|
3126 | | #elif __cplusplus < 201402L |
---|
3127 | | |
---|
3128 | | #error "This is not a C++14 compiler" |
---|
3129 | | |
---|
3130 | | #else |
---|
3131 | | |
---|
3132 | | namespace cxx14 |
---|
3133 | | { |
---|
3134 | | |
---|
3135 | | namespace test_polymorphic_lambdas |
---|
3136 | | { |
---|
3137 | | |
---|
3138 | | int |
---|
3139 | | test() |
---|
3140 | | { |
---|
3141 | | const auto lambda = [](auto&&... args){ |
---|
3142 | | const auto istiny = [](auto x){ |
---|
3143 | | return (sizeof(x) == 1UL) ? 1 : 0; |
---|
3144 | | }; |
---|
3145 | | const int aretiny[] = { istiny(args)... }; |
---|
3146 | | return aretiny[0]; |
---|
3147 | | }; |
---|
3148 | | return lambda(1, 1L, 1.0f, '1'); |
---|
3149 | | } |
---|
3150 | | |
---|
3151 | | } |
---|
3152 | | |
---|
3153 | | namespace test_binary_literals |
---|
3154 | | { |
---|
3155 | | |
---|
3156 | | constexpr auto ivii = 0b0000000000101010; |
---|
3157 | | static_assert(ivii == 42, "wrong value"); |
---|
3158 | | |
---|
3159 | | } |
---|
3160 | | |
---|
3161 | | namespace test_generalized_constexpr |
---|
3162 | | { |
---|
3163 | | |
---|
3164 | | template < typename CharT > |
---|
3165 | | constexpr unsigned long |
---|
3166 | | strlen_c(const CharT *const s) noexcept |
---|
3167 | | { |
---|
3168 | | auto length = 0UL; |
---|
3169 | | for (auto p = s; *p; ++p) |
---|
3170 | | ++length; |
---|
3171 | | return length; |
---|
3172 | | } |
---|
3173 | | |
---|
3174 | | static_assert(strlen_c("") == 0UL, ""); |
---|
3175 | | static_assert(strlen_c("x") == 1UL, ""); |
---|
3176 | | static_assert(strlen_c("test") == 4UL, ""); |
---|
3177 | | static_assert(strlen_c("another\0test") == 7UL, ""); |
---|
3178 | | |
---|
3179 | | } |
---|
3180 | | |
---|
3181 | | namespace test_lambda_init_capture |
---|
3182 | | { |
---|
3183 | | |
---|
3184 | | int |
---|
3185 | | test() |
---|
3186 | | { |
---|
3187 | | auto x = 0; |
---|
3188 | | const auto lambda1 = [a = x](int b){ return a + b; }; |
---|
3189 | | const auto lambda2 = [a = lambda1(x)](){ return a; }; |
---|
3190 | | return lambda2(); |
---|
3191 | | } |
---|
3192 | | |
---|
3193 | | } |
---|
3194 | | |
---|
3195 | | namespace test_digit_separators |
---|
3196 | | { |
---|
3197 | | |
---|
3198 | | constexpr auto ten_million = 100'000'000; |
---|
3199 | | static_assert(ten_million == 100000000, ""); |
---|
3200 | | |
---|
3201 | | } |
---|
3202 | | |
---|
3203 | | namespace test_return_type_deduction |
---|
3204 | | { |
---|
3205 | | |
---|
3206 | | auto f(int& x) { return x; } |
---|
3207 | | decltype(auto) g(int& x) { return x; } |
---|
3208 | | |
---|
3209 | | template < typename T1, typename T2 > |
---|
3210 | | struct is_same |
---|
3211 | | { |
---|
3212 | | static constexpr auto value = false; |
---|
3213 | | }; |
---|
3214 | | |
---|
3215 | | template < typename T > |
---|
3216 | | struct is_same<T, T> |
---|
3217 | | { |
---|
3218 | | static constexpr auto value = true; |
---|
3219 | | }; |
---|
3220 | | |
---|
3221 | | int |
---|
3222 | | test() |
---|
3223 | | { |
---|
3224 | | auto x = 0; |
---|
3225 | | static_assert(is_same<int, decltype(f(x))>::value, ""); |
---|
3226 | | static_assert(is_same<int&, decltype(g(x))>::value, ""); |
---|
3227 | | return x; |
---|
3228 | | } |
---|
3229 | | |
---|
3230 | | } |
---|
3231 | | |
---|
3232 | | } // namespace cxx14 |
---|
3233 | | |
---|
3234 | | #endif // __cplusplus >= 201402L |
---|
3235 | | |
---|
3236 | | |
---|
3237 | | |
---|
3238 | configure:7736: result: no |
---|
3239 | configure:7311: checking whether /usr/bin/clang++ supports C++14 features with +std=c++1y |
---|
3240 | configure:7727: /usr/bin/clang++ +std=c++1y -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
3241 | clang: error: no such file or directory: '+std=c++1y' |
---|
3242 | configure:7727: $? = 1 |
---|
3243 | configure: failed program was: |
---|
3244 | | /* confdefs.h */ |
---|
3245 | | #define PACKAGE_NAME "GIMP" |
---|
3246 | | #define PACKAGE_TARNAME "gimp" |
---|
3247 | | #define PACKAGE_VERSION "2.10.0" |
---|
3248 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
3249 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
3250 | | #define PACKAGE_URL "" |
---|
3251 | | #define GETTEXT_PACKAGE "gimp20" |
---|
3252 | | /* end confdefs.h. */ |
---|
3253 | | |
---|
3254 | | |
---|
3255 | | // If the compiler admits that it is not ready for C++11, why torture it? |
---|
3256 | | // Hopefully, this will speed up the test. |
---|
3257 | | |
---|
3258 | | #ifndef __cplusplus |
---|
3259 | | |
---|
3260 | | #error "This is not a C++ compiler" |
---|
3261 | | |
---|
3262 | | #elif __cplusplus < 201103L |
---|
3263 | | |
---|
3264 | | #error "This is not a C++11 compiler" |
---|
3265 | | |
---|
3266 | | #else |
---|
3267 | | |
---|
3268 | | namespace cxx11 |
---|
3269 | | { |
---|
3270 | | |
---|
3271 | | namespace test_static_assert |
---|
3272 | | { |
---|
3273 | | |
---|
3274 | | template <typename T> |
---|
3275 | | struct check |
---|
3276 | | { |
---|
3277 | | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
---|
3278 | | }; |
---|
3279 | | |
---|
3280 | | } |
---|
3281 | | |
---|
3282 | | namespace test_final_override |
---|
3283 | | { |
---|
3284 | | |
---|
3285 | | struct Base |
---|
3286 | | { |
---|
3287 | | virtual void f() {} |
---|
3288 | | }; |
---|
3289 | | |
---|
3290 | | struct Derived : public Base |
---|
3291 | | { |
---|
3292 | | virtual void f() override {} |
---|
3293 | | }; |
---|
3294 | | |
---|
3295 | | } |
---|
3296 | | |
---|
3297 | | namespace test_double_right_angle_brackets |
---|
3298 | | { |
---|
3299 | | |
---|
3300 | | template < typename T > |
---|
3301 | | struct check {}; |
---|
3302 | | |
---|
3303 | | typedef check<void> single_type; |
---|
3304 | | typedef check<check<void>> double_type; |
---|
3305 | | typedef check<check<check<void>>> triple_type; |
---|
3306 | | typedef check<check<check<check<void>>>> quadruple_type; |
---|
3307 | | |
---|
3308 | | } |
---|
3309 | | |
---|
3310 | | namespace test_decltype |
---|
3311 | | { |
---|
3312 | | |
---|
3313 | | int |
---|
3314 | | f() |
---|
3315 | | { |
---|
3316 | | int a = 1; |
---|
3317 | | decltype(a) b = 2; |
---|
3318 | | return a + b; |
---|
3319 | | } |
---|
3320 | | |
---|
3321 | | } |
---|
3322 | | |
---|
3323 | | namespace test_type_deduction |
---|
3324 | | { |
---|
3325 | | |
---|
3326 | | template < typename T1, typename T2 > |
---|
3327 | | struct is_same |
---|
3328 | | { |
---|
3329 | | static const bool value = false; |
---|
3330 | | }; |
---|
3331 | | |
---|
3332 | | template < typename T > |
---|
3333 | | struct is_same<T, T> |
---|
3334 | | { |
---|
3335 | | static const bool value = true; |
---|
3336 | | }; |
---|
3337 | | |
---|
3338 | | template < typename T1, typename T2 > |
---|
3339 | | auto |
---|
3340 | | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
---|
3341 | | { |
---|
3342 | | return a1 + a2; |
---|
3343 | | } |
---|
3344 | | |
---|
3345 | | int |
---|
3346 | | test(const int c, volatile int v) |
---|
3347 | | { |
---|
3348 | | static_assert(is_same<int, decltype(0)>::value == true, ""); |
---|
3349 | | static_assert(is_same<int, decltype(c)>::value == false, ""); |
---|
3350 | | static_assert(is_same<int, decltype(v)>::value == false, ""); |
---|
3351 | | auto ac = c; |
---|
3352 | | auto av = v; |
---|
3353 | | auto sumi = ac + av + 'x'; |
---|
3354 | | auto sumf = ac + av + 1.0; |
---|
3355 | | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
---|
3356 | | static_assert(is_same<int, decltype(av)>::value == true, ""); |
---|
3357 | | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
---|
3358 | | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
---|
3359 | | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
---|
3360 | | return (sumf > 0.0) ? sumi : add(c, v); |
---|
3361 | | } |
---|
3362 | | |
---|
3363 | | } |
---|
3364 | | |
---|
3365 | | namespace test_noexcept |
---|
3366 | | { |
---|
3367 | | |
---|
3368 | | int f() { return 0; } |
---|
3369 | | int g() noexcept { return 0; } |
---|
3370 | | |
---|
3371 | | static_assert(noexcept(f()) == false, ""); |
---|
3372 | | static_assert(noexcept(g()) == true, ""); |
---|
3373 | | |
---|
3374 | | } |
---|
3375 | | |
---|
3376 | | namespace test_constexpr |
---|
3377 | | { |
---|
3378 | | |
---|
3379 | | template < typename CharT > |
---|
3380 | | unsigned long constexpr |
---|
3381 | | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
---|
3382 | | { |
---|
3383 | | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
---|
3384 | | } |
---|
3385 | | |
---|
3386 | | template < typename CharT > |
---|
3387 | | unsigned long constexpr |
---|
3388 | | strlen_c(const CharT *const s) noexcept |
---|
3389 | | { |
---|
3390 | | return strlen_c_r(s, 0UL); |
---|
3391 | | } |
---|
3392 | | |
---|
3393 | | static_assert(strlen_c("") == 0UL, ""); |
---|
3394 | | static_assert(strlen_c("1") == 1UL, ""); |
---|
3395 | | static_assert(strlen_c("example") == 7UL, ""); |
---|
3396 | | static_assert(strlen_c("another\0example") == 7UL, ""); |
---|
3397 | | |
---|
3398 | | } |
---|
3399 | | |
---|
3400 | | namespace test_rvalue_references |
---|
3401 | | { |
---|
3402 | | |
---|
3403 | | template < int N > |
---|
3404 | | struct answer |
---|
3405 | | { |
---|
3406 | | static constexpr int value = N; |
---|
3407 | | }; |
---|
3408 | | |
---|
3409 | | answer<1> f(int&) { return answer<1>(); } |
---|
3410 | | answer<2> f(const int&) { return answer<2>(); } |
---|
3411 | | answer<3> f(int&&) { return answer<3>(); } |
---|
3412 | | |
---|
3413 | | void |
---|
3414 | | test() |
---|
3415 | | { |
---|
3416 | | int i = 0; |
---|
3417 | | const int c = 0; |
---|
3418 | | static_assert(decltype(f(i))::value == 1, ""); |
---|
3419 | | static_assert(decltype(f(c))::value == 2, ""); |
---|
3420 | | static_assert(decltype(f(0))::value == 3, ""); |
---|
3421 | | } |
---|
3422 | | |
---|
3423 | | } |
---|
3424 | | |
---|
3425 | | namespace test_uniform_initialization |
---|
3426 | | { |
---|
3427 | | |
---|
3428 | | struct test |
---|
3429 | | { |
---|
3430 | | static const int zero {}; |
---|
3431 | | static const int one {1}; |
---|
3432 | | }; |
---|
3433 | | |
---|
3434 | | static_assert(test::zero == 0, ""); |
---|
3435 | | static_assert(test::one == 1, ""); |
---|
3436 | | |
---|
3437 | | } |
---|
3438 | | |
---|
3439 | | namespace test_lambdas |
---|
3440 | | { |
---|
3441 | | |
---|
3442 | | void |
---|
3443 | | test1() |
---|
3444 | | { |
---|
3445 | | auto lambda1 = [](){}; |
---|
3446 | | auto lambda2 = lambda1; |
---|
3447 | | lambda1(); |
---|
3448 | | lambda2(); |
---|
3449 | | } |
---|
3450 | | |
---|
3451 | | int |
---|
3452 | | test2() |
---|
3453 | | { |
---|
3454 | | auto a = [](int i, int j){ return i + j; }(1, 2); |
---|
3455 | | auto b = []() -> int { return '0'; }(); |
---|
3456 | | auto c = [=](){ return a + b; }(); |
---|
3457 | | auto d = [&](){ return c; }(); |
---|
3458 | | auto e = [a, &b](int x) mutable { |
---|
3459 | | const auto identity = [](int y){ return y; }; |
---|
3460 | | for (auto i = 0; i < a; ++i) |
---|
3461 | | a += b--; |
---|
3462 | | return x + identity(a + b); |
---|
3463 | | }(0); |
---|
3464 | | return a + b + c + d + e; |
---|
3465 | | } |
---|
3466 | | |
---|
3467 | | int |
---|
3468 | | test3() |
---|
3469 | | { |
---|
3470 | | const auto nullary = [](){ return 0; }; |
---|
3471 | | const auto unary = [](int x){ return x; }; |
---|
3472 | | using nullary_t = decltype(nullary); |
---|
3473 | | using unary_t = decltype(unary); |
---|
3474 | | const auto higher1st = [](nullary_t f){ return f(); }; |
---|
3475 | | const auto higher2nd = [unary](nullary_t f1){ |
---|
3476 | | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
---|
3477 | | }; |
---|
3478 | | return higher1st(nullary) + higher2nd(nullary)(unary); |
---|
3479 | | } |
---|
3480 | | |
---|
3481 | | } |
---|
3482 | | |
---|
3483 | | namespace test_variadic_templates |
---|
3484 | | { |
---|
3485 | | |
---|
3486 | | template <int...> |
---|
3487 | | struct sum; |
---|
3488 | | |
---|
3489 | | template <int N0, int... N1toN> |
---|
3490 | | struct sum<N0, N1toN...> |
---|
3491 | | { |
---|
3492 | | static constexpr auto value = N0 + sum<N1toN...>::value; |
---|
3493 | | }; |
---|
3494 | | |
---|
3495 | | template <> |
---|
3496 | | struct sum<> |
---|
3497 | | { |
---|
3498 | | static constexpr auto value = 0; |
---|
3499 | | }; |
---|
3500 | | |
---|
3501 | | static_assert(sum<>::value == 0, ""); |
---|
3502 | | static_assert(sum<1>::value == 1, ""); |
---|
3503 | | static_assert(sum<23>::value == 23, ""); |
---|
3504 | | static_assert(sum<1, 2>::value == 3, ""); |
---|
3505 | | static_assert(sum<5, 5, 11>::value == 21, ""); |
---|
3506 | | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
---|
3507 | | |
---|
3508 | | } |
---|
3509 | | |
---|
3510 | | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
---|
3511 | | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
---|
3512 | | // because of this. |
---|
3513 | | namespace test_template_alias_sfinae |
---|
3514 | | { |
---|
3515 | | |
---|
3516 | | struct foo {}; |
---|
3517 | | |
---|
3518 | | template<typename T> |
---|
3519 | | using member = typename T::member_type; |
---|
3520 | | |
---|
3521 | | template<typename T> |
---|
3522 | | void func(...) {} |
---|
3523 | | |
---|
3524 | | template<typename T> |
---|
3525 | | void func(member<T>*) {} |
---|
3526 | | |
---|
3527 | | void test(); |
---|
3528 | | |
---|
3529 | | void test() { func<foo>(0); } |
---|
3530 | | |
---|
3531 | | } |
---|
3532 | | |
---|
3533 | | } // namespace cxx11 |
---|
3534 | | |
---|
3535 | | #endif // __cplusplus >= 201103L |
---|
3536 | | |
---|
3537 | | |
---|
3538 | | |
---|
3539 | | |
---|
3540 | | // If the compiler admits that it is not ready for C++14, why torture it? |
---|
3541 | | // Hopefully, this will speed up the test. |
---|
3542 | | |
---|
3543 | | #ifndef __cplusplus |
---|
3544 | | |
---|
3545 | | #error "This is not a C++ compiler" |
---|
3546 | | |
---|
3547 | | #elif __cplusplus < 201402L |
---|
3548 | | |
---|
3549 | | #error "This is not a C++14 compiler" |
---|
3550 | | |
---|
3551 | | #else |
---|
3552 | | |
---|
3553 | | namespace cxx14 |
---|
3554 | | { |
---|
3555 | | |
---|
3556 | | namespace test_polymorphic_lambdas |
---|
3557 | | { |
---|
3558 | | |
---|
3559 | | int |
---|
3560 | | test() |
---|
3561 | | { |
---|
3562 | | const auto lambda = [](auto&&... args){ |
---|
3563 | | const auto istiny = [](auto x){ |
---|
3564 | | return (sizeof(x) == 1UL) ? 1 : 0; |
---|
3565 | | }; |
---|
3566 | | const int aretiny[] = { istiny(args)... }; |
---|
3567 | | return aretiny[0]; |
---|
3568 | | }; |
---|
3569 | | return lambda(1, 1L, 1.0f, '1'); |
---|
3570 | | } |
---|
3571 | | |
---|
3572 | | } |
---|
3573 | | |
---|
3574 | | namespace test_binary_literals |
---|
3575 | | { |
---|
3576 | | |
---|
3577 | | constexpr auto ivii = 0b0000000000101010; |
---|
3578 | | static_assert(ivii == 42, "wrong value"); |
---|
3579 | | |
---|
3580 | | } |
---|
3581 | | |
---|
3582 | | namespace test_generalized_constexpr |
---|
3583 | | { |
---|
3584 | | |
---|
3585 | | template < typename CharT > |
---|
3586 | | constexpr unsigned long |
---|
3587 | | strlen_c(const CharT *const s) noexcept |
---|
3588 | | { |
---|
3589 | | auto length = 0UL; |
---|
3590 | | for (auto p = s; *p; ++p) |
---|
3591 | | ++length; |
---|
3592 | | return length; |
---|
3593 | | } |
---|
3594 | | |
---|
3595 | | static_assert(strlen_c("") == 0UL, ""); |
---|
3596 | | static_assert(strlen_c("x") == 1UL, ""); |
---|
3597 | | static_assert(strlen_c("test") == 4UL, ""); |
---|
3598 | | static_assert(strlen_c("another\0test") == 7UL, ""); |
---|
3599 | | |
---|
3600 | | } |
---|
3601 | | |
---|
3602 | | namespace test_lambda_init_capture |
---|
3603 | | { |
---|
3604 | | |
---|
3605 | | int |
---|
3606 | | test() |
---|
3607 | | { |
---|
3608 | | auto x = 0; |
---|
3609 | | const auto lambda1 = [a = x](int b){ return a + b; }; |
---|
3610 | | const auto lambda2 = [a = lambda1(x)](){ return a; }; |
---|
3611 | | return lambda2(); |
---|
3612 | | } |
---|
3613 | | |
---|
3614 | | } |
---|
3615 | | |
---|
3616 | | namespace test_digit_separators |
---|
3617 | | { |
---|
3618 | | |
---|
3619 | | constexpr auto ten_million = 100'000'000; |
---|
3620 | | static_assert(ten_million == 100000000, ""); |
---|
3621 | | |
---|
3622 | | } |
---|
3623 | | |
---|
3624 | | namespace test_return_type_deduction |
---|
3625 | | { |
---|
3626 | | |
---|
3627 | | auto f(int& x) { return x; } |
---|
3628 | | decltype(auto) g(int& x) { return x; } |
---|
3629 | | |
---|
3630 | | template < typename T1, typename T2 > |
---|
3631 | | struct is_same |
---|
3632 | | { |
---|
3633 | | static constexpr auto value = false; |
---|
3634 | | }; |
---|
3635 | | |
---|
3636 | | template < typename T > |
---|
3637 | | struct is_same<T, T> |
---|
3638 | | { |
---|
3639 | | static constexpr auto value = true; |
---|
3640 | | }; |
---|
3641 | | |
---|
3642 | | int |
---|
3643 | | test() |
---|
3644 | | { |
---|
3645 | | auto x = 0; |
---|
3646 | | static_assert(is_same<int, decltype(f(x))>::value, ""); |
---|
3647 | | static_assert(is_same<int&, decltype(g(x))>::value, ""); |
---|
3648 | | return x; |
---|
3649 | | } |
---|
3650 | | |
---|
3651 | | } |
---|
3652 | | |
---|
3653 | | } // namespace cxx14 |
---|
3654 | | |
---|
3655 | | #endif // __cplusplus >= 201402L |
---|
3656 | | |
---|
3657 | | |
---|
3658 | | |
---|
3659 | configure:7736: result: no |
---|
3660 | configure:7311: checking whether /usr/bin/clang++ supports C++14 features with -h std=c++1y |
---|
3661 | configure:7727: /usr/bin/clang++ -h std=c++1y -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5 |
---|
3662 | clang: error: unknown argument: '-h' |
---|
3663 | clang: error: no such file or directory: 'std=c++1y' |
---|
3664 | configure:7727: $? = 1 |
---|
3665 | configure: failed program was: |
---|
3666 | | /* confdefs.h */ |
---|
3667 | | #define PACKAGE_NAME "GIMP" |
---|
3668 | | #define PACKAGE_TARNAME "gimp" |
---|
3669 | | #define PACKAGE_VERSION "2.10.0" |
---|
3670 | | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
3671 | | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
3672 | | #define PACKAGE_URL "" |
---|
3673 | | #define GETTEXT_PACKAGE "gimp20" |
---|
3674 | | /* end confdefs.h. */ |
---|
3675 | | |
---|
3676 | | |
---|
3677 | | // If the compiler admits that it is not ready for C++11, why torture it? |
---|
3678 | | // Hopefully, this will speed up the test. |
---|
3679 | | |
---|
3680 | | #ifndef __cplusplus |
---|
3681 | | |
---|
3682 | | #error "This is not a C++ compiler" |
---|
3683 | | |
---|
3684 | | #elif __cplusplus < 201103L |
---|
3685 | | |
---|
3686 | | #error "This is not a C++11 compiler" |
---|
3687 | | |
---|
3688 | | #else |
---|
3689 | | |
---|
3690 | | namespace cxx11 |
---|
3691 | | { |
---|
3692 | | |
---|
3693 | | namespace test_static_assert |
---|
3694 | | { |
---|
3695 | | |
---|
3696 | | template <typename T> |
---|
3697 | | struct check |
---|
3698 | | { |
---|
3699 | | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
---|
3700 | | }; |
---|
3701 | | |
---|
3702 | | } |
---|
3703 | | |
---|
3704 | | namespace test_final_override |
---|
3705 | | { |
---|
3706 | | |
---|
3707 | | struct Base |
---|
3708 | | { |
---|
3709 | | virtual void f() {} |
---|
3710 | | }; |
---|
3711 | | |
---|
3712 | | struct Derived : public Base |
---|
3713 | | { |
---|
3714 | | virtual void f() override {} |
---|
3715 | | }; |
---|
3716 | | |
---|
3717 | | } |
---|
3718 | | |
---|
3719 | | namespace test_double_right_angle_brackets |
---|
3720 | | { |
---|
3721 | | |
---|
3722 | | template < typename T > |
---|
3723 | | struct check {}; |
---|
3724 | | |
---|
3725 | | typedef check<void> single_type; |
---|
3726 | | typedef check<check<void>> double_type; |
---|
3727 | | typedef check<check<check<void>>> triple_type; |
---|
3728 | | typedef check<check<check<check<void>>>> quadruple_type; |
---|
3729 | | |
---|
3730 | | } |
---|
3731 | | |
---|
3732 | | namespace test_decltype |
---|
3733 | | { |
---|
3734 | | |
---|
3735 | | int |
---|
3736 | | f() |
---|
3737 | | { |
---|
3738 | | int a = 1; |
---|
3739 | | decltype(a) b = 2; |
---|
3740 | | return a + b; |
---|
3741 | | } |
---|
3742 | | |
---|
3743 | | } |
---|
3744 | | |
---|
3745 | | namespace test_type_deduction |
---|
3746 | | { |
---|
3747 | | |
---|
3748 | | template < typename T1, typename T2 > |
---|
3749 | | struct is_same |
---|
3750 | | { |
---|
3751 | | static const bool value = false; |
---|
3752 | | }; |
---|
3753 | | |
---|
3754 | | template < typename T > |
---|
3755 | | struct is_same<T, T> |
---|
3756 | | { |
---|
3757 | | static const bool value = true; |
---|
3758 | | }; |
---|
3759 | | |
---|
3760 | | template < typename T1, typename T2 > |
---|
3761 | | auto |
---|
3762 | | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
---|
3763 | | { |
---|
3764 | | return a1 + a2; |
---|
3765 | | } |
---|
3766 | | |
---|
3767 | | int |
---|
3768 | | test(const int c, volatile int v) |
---|
3769 | | { |
---|
3770 | | static_assert(is_same<int, decltype(0)>::value == true, ""); |
---|
3771 | | static_assert(is_same<int, decltype(c)>::value == false, ""); |
---|
3772 | | static_assert(is_same<int, decltype(v)>::value == false, ""); |
---|
3773 | | auto ac = c; |
---|
3774 | | auto av = v; |
---|
3775 | | auto sumi = ac + av + 'x'; |
---|
3776 | | auto sumf = ac + av + 1.0; |
---|
3777 | | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
---|
3778 | | static_assert(is_same<int, decltype(av)>::value == true, ""); |
---|
3779 | | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
---|
3780 | | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
---|
3781 | | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
---|
3782 | | return (sumf > 0.0) ? sumi : add(c, v); |
---|
3783 | | } |
---|
3784 | | |
---|
3785 | | } |
---|
3786 | | |
---|
3787 | | namespace test_noexcept |
---|
3788 | | { |
---|
3789 | | |
---|
3790 | | int f() { return 0; } |
---|
3791 | | int g() noexcept { return 0; } |
---|
3792 | | |
---|
3793 | | static_assert(noexcept(f()) == false, ""); |
---|
3794 | | static_assert(noexcept(g()) == true, ""); |
---|
3795 | | |
---|
3796 | | } |
---|
3797 | | |
---|
3798 | | namespace test_constexpr |
---|
3799 | | { |
---|
3800 | | |
---|
3801 | | template < typename CharT > |
---|
3802 | | unsigned long constexpr |
---|
3803 | | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
---|
3804 | | { |
---|
3805 | | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
---|
3806 | | } |
---|
3807 | | |
---|
3808 | | template < typename CharT > |
---|
3809 | | unsigned long constexpr |
---|
3810 | | strlen_c(const CharT *const s) noexcept |
---|
3811 | | { |
---|
3812 | | return strlen_c_r(s, 0UL); |
---|
3813 | | } |
---|
3814 | | |
---|
3815 | | static_assert(strlen_c("") == 0UL, ""); |
---|
3816 | | static_assert(strlen_c("1") == 1UL, ""); |
---|
3817 | | static_assert(strlen_c("example") == 7UL, ""); |
---|
3818 | | static_assert(strlen_c("another\0example") == 7UL, ""); |
---|
3819 | | |
---|
3820 | | } |
---|
3821 | | |
---|
3822 | | namespace test_rvalue_references |
---|
3823 | | { |
---|
3824 | | |
---|
3825 | | template < int N > |
---|
3826 | | struct answer |
---|
3827 | | { |
---|
3828 | | static constexpr int value = N; |
---|
3829 | | }; |
---|
3830 | | |
---|
3831 | | answer<1> f(int&) { return answer<1>(); } |
---|
3832 | | answer<2> f(const int&) { return answer<2>(); } |
---|
3833 | | answer<3> f(int&&) { return answer<3>(); } |
---|
3834 | | |
---|
3835 | | void |
---|
3836 | | test() |
---|
3837 | | { |
---|
3838 | | int i = 0; |
---|
3839 | | const int c = 0; |
---|
3840 | | static_assert(decltype(f(i))::value == 1, ""); |
---|
3841 | | static_assert(decltype(f(c))::value == 2, ""); |
---|
3842 | | static_assert(decltype(f(0))::value == 3, ""); |
---|
3843 | | } |
---|
3844 | | |
---|
3845 | | } |
---|
3846 | | |
---|
3847 | | namespace test_uniform_initialization |
---|
3848 | | { |
---|
3849 | | |
---|
3850 | | struct test |
---|
3851 | | { |
---|
3852 | | static const int zero {}; |
---|
3853 | | static const int one {1}; |
---|
3854 | | }; |
---|
3855 | | |
---|
3856 | | static_assert(test::zero == 0, ""); |
---|
3857 | | static_assert(test::one == 1, ""); |
---|
3858 | | |
---|
3859 | | } |
---|
3860 | | |
---|
3861 | | namespace test_lambdas |
---|
3862 | | { |
---|
3863 | | |
---|
3864 | | void |
---|
3865 | | test1() |
---|
3866 | | { |
---|
3867 | | auto lambda1 = [](){}; |
---|
3868 | | auto lambda2 = lambda1; |
---|
3869 | | lambda1(); |
---|
3870 | | lambda2(); |
---|
3871 | | } |
---|
3872 | | |
---|
3873 | | int |
---|
3874 | | test2() |
---|
3875 | | { |
---|
3876 | | auto a = [](int i, int j){ return i + j; }(1, 2); |
---|
3877 | | auto b = []() -> int { return '0'; }(); |
---|
3878 | | auto c = [=](){ return a + b; }(); |
---|
3879 | | auto d = [&](){ return c; }(); |
---|
3880 | | auto e = [a, &b](int x) mutable { |
---|
3881 | | const auto identity = [](int y){ return y; }; |
---|
3882 | | for (auto i = 0; i < a; ++i) |
---|
3883 | | a += b--; |
---|
3884 | | return x + identity(a + b); |
---|
3885 | | }(0); |
---|
3886 | | return a + b + c + d + e; |
---|
3887 | | } |
---|
3888 | | |
---|
3889 | | int |
---|
3890 | | test3() |
---|
3891 | | { |
---|
3892 | | const auto nullary = [](){ return 0; }; |
---|
3893 | | const auto unary = [](int x){ return x; }; |
---|
3894 | | using nullary_t = decltype(nullary); |
---|
3895 | | using unary_t = decltype(unary); |
---|
3896 | | const auto higher1st = [](nullary_t f){ return f(); }; |
---|
3897 | | const auto higher2nd = [unary](nullary_t f1){ |
---|
3898 | | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
---|
3899 | | }; |
---|
3900 | | return higher1st(nullary) + higher2nd(nullary)(unary); |
---|
3901 | | } |
---|
3902 | | |
---|
3903 | | } |
---|
3904 | | |
---|
3905 | | namespace test_variadic_templates |
---|
3906 | | { |
---|
3907 | | |
---|
3908 | | template <int...> |
---|
3909 | | struct sum; |
---|
3910 | | |
---|
3911 | | template <int N0, int... N1toN> |
---|
3912 | | struct sum<N0, N1toN...> |
---|
3913 | | { |
---|
3914 | | static constexpr auto value = N0 + sum<N1toN...>::value; |
---|
3915 | | }; |
---|
3916 | | |
---|
3917 | | template <> |
---|
3918 | | struct sum<> |
---|
3919 | | { |
---|
3920 | | static constexpr auto value = 0; |
---|
3921 | | }; |
---|
3922 | | |
---|
3923 | | static_assert(sum<>::value == 0, ""); |
---|
3924 | | static_assert(sum<1>::value == 1, ""); |
---|
3925 | | static_assert(sum<23>::value == 23, ""); |
---|
3926 | | static_assert(sum<1, 2>::value == 3, ""); |
---|
3927 | | static_assert(sum<5, 5, 11>::value == 21, ""); |
---|
3928 | | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
---|
3929 | | |
---|
3930 | | } |
---|
3931 | | |
---|
3932 | | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
---|
3933 | | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
---|
3934 | | // because of this. |
---|
3935 | | namespace test_template_alias_sfinae |
---|
3936 | | { |
---|
3937 | | |
---|
3938 | | struct foo {}; |
---|
3939 | | |
---|
3940 | | template<typename T> |
---|
3941 | | using member = typename T::member_type; |
---|
3942 | | |
---|
3943 | | template<typename T> |
---|
3944 | | void func(...) {} |
---|
3945 | | |
---|
3946 | | template<typename T> |
---|
3947 | | void func(member<T>*) {} |
---|
3948 | | |
---|
3949 | | void test(); |
---|
3950 | | |
---|
3951 | | void test() { func<foo>(0); } |
---|
3952 | | |
---|
3953 | | } |
---|
3954 | | |
---|
3955 | | } // namespace cxx11 |
---|
3956 | | |
---|
3957 | | #endif // __cplusplus >= 201103L |
---|
3958 | | |
---|
3959 | | |
---|
3960 | | |
---|
3961 | | |
---|
3962 | | // If the compiler admits that it is not ready for C++14, why torture it? |
---|
3963 | | // Hopefully, this will speed up the test. |
---|
3964 | | |
---|
3965 | | #ifndef __cplusplus |
---|
3966 | | |
---|
3967 | | #error "This is not a C++ compiler" |
---|
3968 | | |
---|
3969 | | #elif __cplusplus < 201402L |
---|
3970 | | |
---|
3971 | | #error "This is not a C++14 compiler" |
---|
3972 | | |
---|
3973 | | #else |
---|
3974 | | |
---|
3975 | | namespace cxx14 |
---|
3976 | | { |
---|
3977 | | |
---|
3978 | | namespace test_polymorphic_lambdas |
---|
3979 | | { |
---|
3980 | | |
---|
3981 | | int |
---|
3982 | | test() |
---|
3983 | | { |
---|
3984 | | const auto lambda = [](auto&&... args){ |
---|
3985 | | const auto istiny = [](auto x){ |
---|
3986 | | return (sizeof(x) == 1UL) ? 1 : 0; |
---|
3987 | | }; |
---|
3988 | | const int aretiny[] = { istiny(args)... }; |
---|
3989 | | return aretiny[0]; |
---|
3990 | | }; |
---|
3991 | | return lambda(1, 1L, 1.0f, '1'); |
---|
3992 | | } |
---|
3993 | | |
---|
3994 | | } |
---|
3995 | | |
---|
3996 | | namespace test_binary_literals |
---|
3997 | | { |
---|
3998 | | |
---|
3999 | | constexpr auto ivii = 0b0000000000101010; |
---|
4000 | | static_assert(ivii == 42, "wrong value"); |
---|
4001 | | |
---|
4002 | | } |
---|
4003 | | |
---|
4004 | | namespace test_generalized_constexpr |
---|
4005 | | { |
---|
4006 | | |
---|
4007 | | template < typename CharT > |
---|
4008 | | constexpr unsigned long |
---|
4009 | | strlen_c(const CharT *const s) noexcept |
---|
4010 | | { |
---|
4011 | | auto length = 0UL; |
---|
4012 | | for (auto p = s; *p; ++p) |
---|
4013 | | ++length; |
---|
4014 | | return length; |
---|
4015 | | } |
---|
4016 | | |
---|
4017 | | static_assert(strlen_c("") == 0UL, ""); |
---|
4018 | | static_assert(strlen_c("x") == 1UL, ""); |
---|
4019 | | static_assert(strlen_c("test") == 4UL, ""); |
---|
4020 | | static_assert(strlen_c("another\0test") == 7UL, ""); |
---|
4021 | | |
---|
4022 | | } |
---|
4023 | | |
---|
4024 | | namespace test_lambda_init_capture |
---|
4025 | | { |
---|
4026 | | |
---|
4027 | | int |
---|
4028 | | test() |
---|
4029 | | { |
---|
4030 | | auto x = 0; |
---|
4031 | | const auto lambda1 = [a = x](int b){ return a + b; }; |
---|
4032 | | const auto lambda2 = [a = lambda1(x)](){ return a; }; |
---|
4033 | | return lambda2(); |
---|
4034 | | } |
---|
4035 | | |
---|
4036 | | } |
---|
4037 | | |
---|
4038 | | namespace test_digit_separators |
---|
4039 | | { |
---|
4040 | | |
---|
4041 | | constexpr auto ten_million = 100'000'000; |
---|
4042 | | static_assert(ten_million == 100000000, ""); |
---|
4043 | | |
---|
4044 | | } |
---|
4045 | | |
---|
4046 | | namespace test_return_type_deduction |
---|
4047 | | { |
---|
4048 | | |
---|
4049 | | auto f(int& x) { return x; } |
---|
4050 | | decltype(auto) g(int& x) { return x; } |
---|
4051 | | |
---|
4052 | | template < typename T1, typename T2 > |
---|
4053 | | struct is_same |
---|
4054 | | { |
---|
4055 | | static constexpr auto value = false; |
---|
4056 | | }; |
---|
4057 | | |
---|
4058 | | template < typename T > |
---|
4059 | | struct is_same<T, T> |
---|
4060 | | { |
---|
4061 | | static constexpr auto value = true; |
---|
4062 | | }; |
---|
4063 | | |
---|
4064 | | int |
---|
4065 | | test() |
---|
4066 | | { |
---|
4067 | | auto x = 0; |
---|
4068 | | static_assert(is_same<int, decltype(f(x))>::value, ""); |
---|
4069 | | static_assert(is_same<int&, decltype(g(x))>::value, ""); |
---|
4070 | | return x; |
---|
4071 | | } |
---|
4072 | | |
---|
4073 | | } |
---|
4074 | | |
---|
4075 | | } // namespace cxx14 |
---|
4076 | | |
---|
4077 | | #endif // __cplusplus >= 201402L |
---|
4078 | | |
---|
4079 | | |
---|
4080 | | |
---|
4081 | configure:7736: result: no |
---|
4082 | configure:7760: error: *** A compiler with support for C++14 language features is required. |
---|
4083 | |
---|
4084 | ## ---------------- ## |
---|
4085 | ## Cache variables. ## |
---|
4086 | ## ---------------- ## |
---|
4087 | |
---|
4088 | ac_cv_build=x86_64-apple-darwin13.4.0 |
---|
4089 | ac_cv_build_prog_CPP='/usr/bin/clang -E' |
---|
4090 | ac_cv_build_prog_cc_g=yes |
---|
4091 | ac_cv_c_compiler_gnu=yes |
---|
4092 | ac_cv_cxx_compiler_gnu=yes |
---|
4093 | ac_cv_env_ATK_CFLAGS_set= |
---|
4094 | ac_cv_env_ATK_CFLAGS_value= |
---|
4095 | ac_cv_env_ATK_LIBS_set= |
---|
4096 | ac_cv_env_ATK_LIBS_value= |
---|
4097 | ac_cv_env_BABL_CFLAGS_set= |
---|
4098 | ac_cv_env_BABL_CFLAGS_value= |
---|
4099 | ac_cv_env_BABL_LIBS_set= |
---|
4100 | ac_cv_env_BABL_LIBS_value= |
---|
4101 | ac_cv_env_CAIRO_CFLAGS_set= |
---|
4102 | ac_cv_env_CAIRO_CFLAGS_value= |
---|
4103 | ac_cv_env_CAIRO_LIBS_set= |
---|
4104 | ac_cv_env_CAIRO_LIBS_value= |
---|
4105 | ac_cv_env_CAIRO_PDF_CFLAGS_set= |
---|
4106 | ac_cv_env_CAIRO_PDF_CFLAGS_value= |
---|
4107 | ac_cv_env_CAIRO_PDF_LIBS_set= |
---|
4108 | ac_cv_env_CAIRO_PDF_LIBS_value= |
---|
4109 | ac_cv_env_CCASFLAGS_set= |
---|
4110 | ac_cv_env_CCASFLAGS_value= |
---|
4111 | ac_cv_env_CCAS_set= |
---|
4112 | ac_cv_env_CCAS_value= |
---|
4113 | ac_cv_env_CCC_set= |
---|
4114 | ac_cv_env_CCC_value= |
---|
4115 | ac_cv_env_CC_set=set |
---|
4116 | ac_cv_env_CC_value=/usr/bin/clang |
---|
4117 | ac_cv_env_CFLAGS_set=set |
---|
4118 | ac_cv_env_CFLAGS_value='-pipe -Os -arch x86_64' |
---|
4119 | ac_cv_env_CPPFLAGS_set=set |
---|
4120 | ac_cv_env_CPPFLAGS_value=-I/opt/local/include |
---|
4121 | ac_cv_env_CPP_set= |
---|
4122 | ac_cv_env_CPP_value= |
---|
4123 | ac_cv_env_CXXCPP_set= |
---|
4124 | ac_cv_env_CXXCPP_value= |
---|
4125 | ac_cv_env_CXXFLAGS_set=set |
---|
4126 | ac_cv_env_CXXFLAGS_value='-pipe -Os -stdlib=libc++ -arch x86_64' |
---|
4127 | ac_cv_env_CXX_set=set |
---|
4128 | ac_cv_env_CXX_value=/usr/bin/clang++ |
---|
4129 | ac_cv_env_FONTCONFIG_CFLAGS_set= |
---|
4130 | ac_cv_env_FONTCONFIG_CFLAGS_value= |
---|
4131 | ac_cv_env_FONTCONFIG_LIBS_set= |
---|
4132 | ac_cv_env_FONTCONFIG_LIBS_value= |
---|
4133 | ac_cv_env_FREETYPE_CFLAGS_set= |
---|
4134 | ac_cv_env_FREETYPE_CFLAGS_value= |
---|
4135 | ac_cv_env_FREETYPE_LIBS_set= |
---|
4136 | ac_cv_env_FREETYPE_LIBS_value= |
---|
4137 | ac_cv_env_GDK_PIXBUF_CFLAGS_set= |
---|
4138 | ac_cv_env_GDK_PIXBUF_CFLAGS_value= |
---|
4139 | ac_cv_env_GDK_PIXBUF_LIBS_set= |
---|
4140 | ac_cv_env_GDK_PIXBUF_LIBS_value= |
---|
4141 | ac_cv_env_GEGL_CFLAGS_set= |
---|
4142 | ac_cv_env_GEGL_CFLAGS_value= |
---|
4143 | ac_cv_env_GEGL_LIBS_set= |
---|
4144 | ac_cv_env_GEGL_LIBS_value= |
---|
4145 | ac_cv_env_GEXIV2_CFLAGS_set= |
---|
4146 | ac_cv_env_GEXIV2_CFLAGS_value= |
---|
4147 | ac_cv_env_GEXIV2_LIBS_set= |
---|
4148 | ac_cv_env_GEXIV2_LIBS_value= |
---|
4149 | ac_cv_env_GIO_CFLAGS_set= |
---|
4150 | ac_cv_env_GIO_CFLAGS_value= |
---|
4151 | ac_cv_env_GIO_LIBS_set= |
---|
4152 | ac_cv_env_GIO_LIBS_value= |
---|
4153 | ac_cv_env_GIO_UNIX_CFLAGS_set= |
---|
4154 | ac_cv_env_GIO_UNIX_CFLAGS_value= |
---|
4155 | ac_cv_env_GIO_UNIX_LIBS_set= |
---|
4156 | ac_cv_env_GIO_UNIX_LIBS_value= |
---|
4157 | ac_cv_env_GIO_WINDOWS_CFLAGS_set= |
---|
4158 | ac_cv_env_GIO_WINDOWS_CFLAGS_value= |
---|
4159 | ac_cv_env_GIO_WINDOWS_LIBS_set= |
---|
4160 | ac_cv_env_GIO_WINDOWS_LIBS_value= |
---|
4161 | ac_cv_env_GMODULE_NO_EXPORT_CFLAGS_set= |
---|
4162 | ac_cv_env_GMODULE_NO_EXPORT_CFLAGS_value= |
---|
4163 | ac_cv_env_GMODULE_NO_EXPORT_LIBS_set= |
---|
4164 | ac_cv_env_GMODULE_NO_EXPORT_LIBS_value= |
---|
4165 | ac_cv_env_GTKDOC_DEPS_CFLAGS_set= |
---|
4166 | ac_cv_env_GTKDOC_DEPS_CFLAGS_value= |
---|
4167 | ac_cv_env_GTKDOC_DEPS_LIBS_set= |
---|
4168 | ac_cv_env_GTKDOC_DEPS_LIBS_value= |
---|
4169 | ac_cv_env_GTK_MAC_INTEGRATION_CFLAGS_set= |
---|
4170 | ac_cv_env_GTK_MAC_INTEGRATION_CFLAGS_value= |
---|
4171 | ac_cv_env_GTK_MAC_INTEGRATION_LIBS_set= |
---|
4172 | ac_cv_env_GTK_MAC_INTEGRATION_LIBS_value= |
---|
4173 | ac_cv_env_GUDEV_CFLAGS_set= |
---|
4174 | ac_cv_env_GUDEV_CFLAGS_value= |
---|
4175 | ac_cv_env_GUDEV_LIBS_set= |
---|
4176 | ac_cv_env_GUDEV_LIBS_value= |
---|
4177 | ac_cv_env_HARFBUZZ_CFLAGS_set= |
---|
4178 | ac_cv_env_HARFBUZZ_CFLAGS_value= |
---|
4179 | ac_cv_env_HARFBUZZ_LIBS_set= |
---|
4180 | ac_cv_env_HARFBUZZ_LIBS_value= |
---|
4181 | ac_cv_env_LCMS_CFLAGS_set= |
---|
4182 | ac_cv_env_LCMS_CFLAGS_value= |
---|
4183 | ac_cv_env_LCMS_LIBS_set= |
---|
4184 | ac_cv_env_LCMS_LIBS_value= |
---|
4185 | ac_cv_env_LDFLAGS_set=set |
---|
4186 | ac_cv_env_LDFLAGS_value='-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64' |
---|
4187 | ac_cv_env_LIBMYPAINT_CFLAGS_set= |
---|
4188 | ac_cv_env_LIBMYPAINT_CFLAGS_value= |
---|
4189 | ac_cv_env_LIBMYPAINT_LIBS_set= |
---|
4190 | ac_cv_env_LIBMYPAINT_LIBS_value= |
---|
4191 | ac_cv_env_LIBS_set= |
---|
4192 | ac_cv_env_LIBS_value= |
---|
4193 | ac_cv_env_LT_SYS_LIBRARY_PATH_set= |
---|
4194 | ac_cv_env_LT_SYS_LIBRARY_PATH_value= |
---|
4195 | ac_cv_env_LZMA_CFLAGS_set= |
---|
4196 | ac_cv_env_LZMA_CFLAGS_value= |
---|
4197 | ac_cv_env_LZMA_LIBS_set= |
---|
4198 | ac_cv_env_LZMA_LIBS_value= |
---|
4199 | ac_cv_env_MIME_INFO_CFLAGS_set= |
---|
4200 | ac_cv_env_MIME_INFO_CFLAGS_value= |
---|
4201 | ac_cv_env_MIME_INFO_LIBS_set= |
---|
4202 | ac_cv_env_MIME_INFO_LIBS_value= |
---|
4203 | ac_cv_env_MYPAINT_BRUSHES_CFLAGS_set= |
---|
4204 | ac_cv_env_MYPAINT_BRUSHES_CFLAGS_value= |
---|
4205 | ac_cv_env_MYPAINT_BRUSHES_LIBS_set= |
---|
4206 | ac_cv_env_MYPAINT_BRUSHES_LIBS_value= |
---|
4207 | ac_cv_env_OPENEXR_CFLAGS_set= |
---|
4208 | ac_cv_env_OPENEXR_CFLAGS_value= |
---|
4209 | ac_cv_env_OPENEXR_LIBS_set= |
---|
4210 | ac_cv_env_OPENEXR_LIBS_value= |
---|
4211 | ac_cv_env_OPENJPEG_CFLAGS_set= |
---|
4212 | ac_cv_env_OPENJPEG_CFLAGS_value= |
---|
4213 | ac_cv_env_OPENJPEG_LIBS_set= |
---|
4214 | ac_cv_env_OPENJPEG_LIBS_value= |
---|
4215 | ac_cv_env_PANGOCAIRO_CFLAGS_set= |
---|
4216 | ac_cv_env_PANGOCAIRO_CFLAGS_value= |
---|
4217 | ac_cv_env_PANGOCAIRO_LIBS_set= |
---|
4218 | ac_cv_env_PANGOCAIRO_LIBS_value= |
---|
4219 | ac_cv_env_PKG_CONFIG_LIBDIR_set= |
---|
4220 | ac_cv_env_PKG_CONFIG_LIBDIR_value= |
---|
4221 | ac_cv_env_PKG_CONFIG_PATH_set=set |
---|
4222 | ac_cv_env_PKG_CONFIG_PATH_value=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig |
---|
4223 | ac_cv_env_PKG_CONFIG_set= |
---|
4224 | ac_cv_env_PKG_CONFIG_value= |
---|
4225 | ac_cv_env_PNG_CFLAGS_set= |
---|
4226 | ac_cv_env_PNG_CFLAGS_value= |
---|
4227 | ac_cv_env_PNG_LIBS_set= |
---|
4228 | ac_cv_env_PNG_LIBS_value= |
---|
4229 | ac_cv_env_POPPLER_CFLAGS_set= |
---|
4230 | ac_cv_env_POPPLER_CFLAGS_value= |
---|
4231 | ac_cv_env_POPPLER_DATA_CFLAGS_set= |
---|
4232 | ac_cv_env_POPPLER_DATA_CFLAGS_value= |
---|
4233 | ac_cv_env_POPPLER_DATA_LIBS_set= |
---|
4234 | ac_cv_env_POPPLER_DATA_LIBS_value= |
---|
4235 | ac_cv_env_POPPLER_LIBS_set= |
---|
4236 | ac_cv_env_POPPLER_LIBS_value= |
---|
4237 | ac_cv_env_PYCAIRO_CFLAGS_set= |
---|
4238 | ac_cv_env_PYCAIRO_CFLAGS_value= |
---|
4239 | ac_cv_env_PYCAIRO_LIBS_set= |
---|
4240 | ac_cv_env_PYCAIRO_LIBS_value= |
---|
4241 | ac_cv_env_PYGTK_CFLAGS_set= |
---|
4242 | ac_cv_env_PYGTK_CFLAGS_value= |
---|
4243 | ac_cv_env_PYGTK_LIBS_set= |
---|
4244 | ac_cv_env_PYGTK_LIBS_value= |
---|
4245 | ac_cv_env_PYTHON_set=set |
---|
4246 | ac_cv_env_PYTHON_value=/opt/local/bin/python2.7 |
---|
4247 | ac_cv_env_RECOMMENDED_WIN32_GTK_CFLAGS_set= |
---|
4248 | ac_cv_env_RECOMMENDED_WIN32_GTK_CFLAGS_value= |
---|
4249 | ac_cv_env_RECOMMENDED_WIN32_GTK_LIBS_set= |
---|
4250 | ac_cv_env_RECOMMENDED_WIN32_GTK_LIBS_value= |
---|
4251 | ac_cv_env_SVG_CFLAGS_set= |
---|
4252 | ac_cv_env_SVG_CFLAGS_value= |
---|
4253 | ac_cv_env_SVG_LIBS_set= |
---|
4254 | ac_cv_env_SVG_LIBS_value= |
---|
4255 | ac_cv_env_WEBKIT_CFLAGS_set= |
---|
4256 | ac_cv_env_WEBKIT_CFLAGS_value= |
---|
4257 | ac_cv_env_WEBKIT_LIBS_set= |
---|
4258 | ac_cv_env_WEBKIT_LIBS_value= |
---|
4259 | ac_cv_env_WEBPDEMUX_CFLAGS_set= |
---|
4260 | ac_cv_env_WEBPDEMUX_CFLAGS_value= |
---|
4261 | ac_cv_env_WEBPDEMUX_LIBS_set= |
---|
4262 | ac_cv_env_WEBPDEMUX_LIBS_value= |
---|
4263 | ac_cv_env_WEBPMUX_CFLAGS_set= |
---|
4264 | ac_cv_env_WEBPMUX_CFLAGS_value= |
---|
4265 | ac_cv_env_WEBPMUX_LIBS_set= |
---|
4266 | ac_cv_env_WEBPMUX_LIBS_value= |
---|
4267 | ac_cv_env_WEBP_CFLAGS_set= |
---|
4268 | ac_cv_env_WEBP_CFLAGS_value= |
---|
4269 | ac_cv_env_WEBP_LIBS_set= |
---|
4270 | ac_cv_env_WEBP_LIBS_value= |
---|
4271 | ac_cv_env_XFIXES_CFLAGS_set= |
---|
4272 | ac_cv_env_XFIXES_CFLAGS_value= |
---|
4273 | ac_cv_env_XFIXES_LIBS_set= |
---|
4274 | ac_cv_env_XFIXES_LIBS_value= |
---|
4275 | ac_cv_env_XMC_CFLAGS_set= |
---|
4276 | ac_cv_env_XMC_CFLAGS_value= |
---|
4277 | ac_cv_env_XMC_LIBS_set= |
---|
4278 | ac_cv_env_XMC_LIBS_value= |
---|
4279 | ac_cv_env_XMKMF_set= |
---|
4280 | ac_cv_env_XMKMF_value= |
---|
4281 | ac_cv_env_build_alias_set=set |
---|
4282 | ac_cv_env_build_alias_value=x86_64-apple-darwin13.4.0 |
---|
4283 | ac_cv_env_host_alias_set= |
---|
4284 | ac_cv_env_host_alias_value= |
---|
4285 | ac_cv_env_target_alias_set= |
---|
4286 | ac_cv_env_target_alias_value= |
---|
4287 | ac_cv_host=x86_64-apple-darwin13.4.0 |
---|
4288 | ac_cv_objext=o |
---|
4289 | ac_cv_path_INTLTOOL_PERL=/opt/local/bin/perl5.26 |
---|
4290 | ac_cv_path_mkdir=/opt/local/bin/gmkdir |
---|
4291 | ac_cv_prog_AWK=gawk |
---|
4292 | ac_cv_prog_CPP='/usr/bin/clang -E' |
---|
4293 | ac_cv_prog_ac_ct_CC=/usr/bin/clang |
---|
4294 | ac_cv_prog_ac_ct_CC_FOR_BUILD=/usr/bin/clang |
---|
4295 | ac_cv_prog_cc_c89= |
---|
4296 | ac_cv_prog_cc_g=yes |
---|
4297 | ac_cv_prog_cxx_g=yes |
---|
4298 | ac_cv_prog_make_make_set=yes |
---|
4299 | am_cv_CC_dependencies_compiler_type=gcc3 |
---|
4300 | am_cv_CXX_dependencies_compiler_type=gcc3 |
---|
4301 | am_cv_make_support_nested_variables=yes |
---|
4302 | am_cv_prog_cc_c_o=yes |
---|
4303 | ax_cv_cxx_compile_cxx14=no |
---|
4304 | ax_cv_cxx_compile_cxx14__h_std_cpp14=no |
---|
4305 | ax_cv_cxx_compile_cxx14__h_std_cpp1y=no |
---|
4306 | ax_cv_cxx_compile_cxx14__std_cpp14=no |
---|
4307 | ax_cv_cxx_compile_cxx14__std_cpp1y=no |
---|
4308 | ax_cv_cxx_compile_cxx14__std_gnupp14=no |
---|
4309 | ax_cv_cxx_compile_cxx14__std_gnupp1y=no |
---|
4310 | ax_cv_cxx_compile_cxx14_pstd_cpp14=no |
---|
4311 | ax_cv_cxx_compile_cxx14_pstd_cpp1y=no |
---|
4312 | |
---|
4313 | ## ----------------- ## |
---|
4314 | ## Output variables. ## |
---|
4315 | ## ----------------- ## |
---|
4316 | |
---|
4317 | AA_LIBS='' |
---|
4318 | ACLOCAL='${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.0/missing aclocal-1.16' |
---|
4319 | ALLOCA='' |
---|
4320 | ALL_LINGUAS='' |
---|
4321 | ALSA_CFLAGS='' |
---|
4322 | ALSA_LIBS='' |
---|
4323 | ALTIVEC_EXTRA_CFLAGS='' |
---|
4324 | AMDEPBACKSLASH='\' |
---|
4325 | AMDEP_FALSE='#' |
---|
4326 | AMDEP_TRUE='' |
---|
4327 | AMTAR='$${TAR-tar}' |
---|
4328 | AM_BACKSLASH='\' |
---|
4329 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' |
---|
4330 | AM_DEFAULT_VERBOSITY='1' |
---|
4331 | AM_V='$(V)' |
---|
4332 | APPSTREAM_UTIL='' |
---|
4333 | AR='' |
---|
4334 | AS='' |
---|
4335 | ATK_CFLAGS='' |
---|
4336 | ATK_LIBS='' |
---|
4337 | ATK_REQUIRED_VERSION='2.2.0' |
---|
4338 | AUTOCONF='${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.0/missing autoconf' |
---|
4339 | AUTOHEADER='${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.0/missing autoheader' |
---|
4340 | AUTOMAKE='${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.0/missing automake-1.16' |
---|
4341 | AWK='gawk' |
---|
4342 | BABL_CFLAGS='' |
---|
4343 | BABL_LIBS='' |
---|
4344 | BABL_REQUIRED_VERSION='0.1.46' |
---|
4345 | BINRELOC_CFLAGS='' |
---|
4346 | BINRELOC_LIBS='' |
---|
4347 | BUILD_EXEEXT='' |
---|
4348 | BUILD_OBJEXT='' |
---|
4349 | BUILD_PRINT_FALSE='' |
---|
4350 | BUILD_PRINT_TRUE='' |
---|
4351 | BUILD_PYTHON_FALSE='' |
---|
4352 | BUILD_PYTHON_TRUE='' |
---|
4353 | BUILD_SCRIPT_FU_FALSE='' |
---|
4354 | BUILD_SCRIPT_FU_TRUE='' |
---|
4355 | BUILD_WINDOWS_INSTALLER_FALSE='' |
---|
4356 | BUILD_WINDOWS_INSTALLER_TRUE='' |
---|
4357 | BZIP2_LIBS='' |
---|
4358 | CAIRO_CFLAGS='' |
---|
4359 | CAIRO_LIBS='' |
---|
4360 | CAIRO_PDF_CFLAGS='' |
---|
4361 | CAIRO_PDF_LIBS='' |
---|
4362 | CAIRO_PDF_REQUIRED_VERSION='1.12.2' |
---|
4363 | CAIRO_REQUIRED_VERSION='1.12.2' |
---|
4364 | CATALOGS='' |
---|
4365 | CATOBJEXT='' |
---|
4366 | CC='/usr/bin/clang' |
---|
4367 | CCAS='' |
---|
4368 | CCASDEPMODE='' |
---|
4369 | CCASFLAGS='' |
---|
4370 | CCDEPMODE='depmode=gcc3' |
---|
4371 | CC_FOR_BUILD='/usr/bin/clang' |
---|
4372 | CC_VERSION='' |
---|
4373 | CFLAGS='-pipe -Os -arch x86_64' |
---|
4374 | CFLAGS_FOR_BUILD='-g -O2' |
---|
4375 | CPP='/usr/bin/clang -E' |
---|
4376 | CPPFLAGS='-I/opt/local/include' |
---|
4377 | CPPFLAGS_FOR_BUILD='' |
---|
4378 | CPP_FOR_BUILD='/usr/bin/clang -E' |
---|
4379 | CXX='/usr/bin/clang++' |
---|
4380 | CXXCPP='' |
---|
4381 | CXXDEPMODE='depmode=gcc3' |
---|
4382 | CXXFLAGS='-pipe -Os -stdlib=libc++ -arch x86_64' |
---|
4383 | CYGPATH_W='echo' |
---|
4384 | DATADIRNAME='' |
---|
4385 | DEFAULT_BINARY_FALSE='' |
---|
4386 | DEFAULT_BINARY_TRUE='' |
---|
4387 | DEFS='' |
---|
4388 | DEPDIR='.deps' |
---|
4389 | DESKTOP_DATADIR='' |
---|
4390 | DESKTOP_DATADIR_FALSE='' |
---|
4391 | DESKTOP_DATADIR_TRUE='' |
---|
4392 | DLLTOOL='' |
---|
4393 | DOC_SHOOTER='' |
---|
4394 | DSYMUTIL='' |
---|
4395 | DUMPBIN='' |
---|
4396 | ECHO_C='\c' |
---|
4397 | ECHO_N='' |
---|
4398 | ECHO_T='' |
---|
4399 | EGREP='' |
---|
4400 | ENABLE_GIMP_CONSOLE_FALSE='' |
---|
4401 | ENABLE_GIMP_CONSOLE_TRUE='' |
---|
4402 | ENABLE_GTK_DOC_APP_FALSE='' |
---|
4403 | ENABLE_GTK_DOC_APP_TRUE='' |
---|
4404 | ENABLE_GTK_DOC_FALSE='' |
---|
4405 | ENABLE_GTK_DOC_TRUE='' |
---|
4406 | ENABLE_VECTOR_ICONS_FALSE='' |
---|
4407 | ENABLE_VECTOR_ICONS_TRUE='' |
---|
4408 | EXEEXT='' |
---|
4409 | FGREP='' |
---|
4410 | FILE_AA='' |
---|
4411 | FILE_EXR='' |
---|
4412 | FILE_JP2_LOAD='' |
---|
4413 | FILE_MNG='' |
---|
4414 | FILE_PDF_SAVE='' |
---|
4415 | FILE_PS='' |
---|
4416 | FILE_WMF='' |
---|
4417 | FILE_XMC='' |
---|
4418 | FILE_XPM='' |
---|
4419 | FONTCONFIG_CFLAGS='' |
---|
4420 | FONTCONFIG_LIBS='' |
---|
4421 | FONTCONFIG_REQUIRED_VERSION='2.12.4' |
---|
4422 | FREETYPE2_REQUIRED_VERSION='2.1.7' |
---|
4423 | FREETYPE_CFLAGS='' |
---|
4424 | FREETYPE_LIBS='' |
---|
4425 | GDBUS_CODEGEN='' |
---|
4426 | GDK_PIXBUF_CFLAGS='' |
---|
4427 | GDK_PIXBUF_CSOURCE='' |
---|
4428 | GDK_PIXBUF_LIBS='' |
---|
4429 | GDK_PIXBUF_REQUIRED_VERSION='2.30.8' |
---|
4430 | GEGL='' |
---|
4431 | GEGL_CFLAGS='' |
---|
4432 | GEGL_LIBS='' |
---|
4433 | GEGL_REQUIRED_VERSION='0.4.0' |
---|
4434 | GETTEXT_PACKAGE='gimp20' |
---|
4435 | GEXIV2_CFLAGS='' |
---|
4436 | GEXIV2_LIBS='' |
---|
4437 | GEXIV2_REQUIRED_VERSION='0.10.6' |
---|
4438 | GIMP_API_VERSION='2.0' |
---|
4439 | GIMP_APP_VERSION='2.10' |
---|
4440 | GIMP_BINARY_AGE='1000' |
---|
4441 | GIMP_COMMAND='' |
---|
4442 | GIMP_DATA_VERSION='2.0' |
---|
4443 | GIMP_FULL_NAME='GNU Image Manipulation Program' |
---|
4444 | GIMP_INTERFACE_AGE='0' |
---|
4445 | GIMP_MAJOR_VERSION='2' |
---|
4446 | GIMP_MICRO_VERSION='0' |
---|
4447 | GIMP_MINOR_VERSION='10' |
---|
4448 | GIMP_MKENUMS='' |
---|
4449 | GIMP_MODULES='' |
---|
4450 | GIMP_PKGCONFIG_VERSION='2.0' |
---|
4451 | GIMP_PLUGINS='' |
---|
4452 | GIMP_PLUGIN_VERSION='2.0' |
---|
4453 | GIMP_REAL_VERSION='2.10.0' |
---|
4454 | GIMP_SYSCONF_VERSION='2.0' |
---|
4455 | GIMP_TOOL_VERSION='2.0' |
---|
4456 | GIMP_UNSTABLE='no' |
---|
4457 | GIMP_UNSTABLE_FALSE='' |
---|
4458 | GIMP_UNSTABLE_TRUE='#' |
---|
4459 | GIMP_USER_VERSION='2.10' |
---|
4460 | GIMP_VERSION='2.10.0' |
---|
4461 | GIO_CFLAGS='' |
---|
4462 | GIO_LIBS='' |
---|
4463 | GIO_UNIX_CFLAGS='' |
---|
4464 | GIO_UNIX_LIBS='' |
---|
4465 | GIO_WINDOWS_CFLAGS='' |
---|
4466 | GIO_WINDOWS_LIBS='' |
---|
4467 | GLIB_CFLAGS='' |
---|
4468 | GLIB_COMPILE_RESOURCES='' |
---|
4469 | GLIB_GENMARSHAL='' |
---|
4470 | GLIB_LIBS='' |
---|
4471 | GLIB_MKENUMS='' |
---|
4472 | GLIB_REQUIRED_VERSION='2.54.2' |
---|
4473 | GMODULE_NO_EXPORT_CFLAGS='' |
---|
4474 | GMODULE_NO_EXPORT_LIBS='' |
---|
4475 | GMOFILES='' |
---|
4476 | GMSGFMT='' |
---|
4477 | GOBJECT_QUERY='' |
---|
4478 | GREP='' |
---|
4479 | GS_LIBS='' |
---|
4480 | GTKDOC_CHECK='' |
---|
4481 | GTKDOC_CHECK_PATH='' |
---|
4482 | GTKDOC_DEPS_CFLAGS='' |
---|
4483 | GTKDOC_DEPS_LIBS='' |
---|
4484 | GTKDOC_MKPDF='' |
---|
4485 | GTKDOC_REBASE='' |
---|
4486 | GTK_CFLAGS='' |
---|
4487 | GTK_DOC_BUILD_HTML_FALSE='' |
---|
4488 | GTK_DOC_BUILD_HTML_TRUE='' |
---|
4489 | GTK_DOC_BUILD_PDF_FALSE='' |
---|
4490 | GTK_DOC_BUILD_PDF_TRUE='' |
---|
4491 | GTK_DOC_USE_LIBTOOL_FALSE='' |
---|
4492 | GTK_DOC_USE_LIBTOOL_TRUE='' |
---|
4493 | GTK_DOC_USE_REBASE_FALSE='' |
---|
4494 | GTK_DOC_USE_REBASE_TRUE='' |
---|
4495 | GTK_LIBS='' |
---|
4496 | GTK_MAC_INTEGRATION_CFLAGS='' |
---|
4497 | GTK_MAC_INTEGRATION_LIBS='' |
---|
4498 | GTK_REQUIRED_VERSION='2.24.10' |
---|
4499 | GTK_UPDATE_ICON_CACHE='' |
---|
4500 | GTK_WIN32_RECOMMENDED_VERSION='2.24.32' |
---|
4501 | GUDEV_CFLAGS='' |
---|
4502 | GUDEV_LIBS='' |
---|
4503 | HARFBUZZ_CFLAGS='' |
---|
4504 | HARFBUZZ_LIBS='' |
---|
4505 | HARFBUZZ_REQUIRED_VERSION='0.9.19' |
---|
4506 | HAVE_APPSTREAM_UTIL_FALSE='' |
---|
4507 | HAVE_APPSTREAM_UTIL_TRUE='' |
---|
4508 | HAVE_CXX14='' |
---|
4509 | HAVE_DX_DINPUT_FALSE='' |
---|
4510 | HAVE_DX_DINPUT_TRUE='' |
---|
4511 | HAVE_EXCHNDL_FALSE='' |
---|
4512 | HAVE_EXCHNDL_TRUE='' |
---|
4513 | HAVE_FINITE='' |
---|
4514 | HAVE_GS_FALSE='' |
---|
4515 | HAVE_GS_TRUE='' |
---|
4516 | HAVE_GTK_DOC_FALSE='' |
---|
4517 | HAVE_GTK_DOC_TRUE='' |
---|
4518 | HAVE_ISFINITE='' |
---|
4519 | HAVE_LINUX_INPUT_FALSE='' |
---|
4520 | HAVE_LINUX_INPUT_TRUE='' |
---|
4521 | HAVE_OPENEXR_FALSE='' |
---|
4522 | HAVE_OPENEXR_TRUE='' |
---|
4523 | HAVE_OPENJPEG_FALSE='' |
---|
4524 | HAVE_OPENJPEG_TRUE='' |
---|
4525 | HAVE_VFORK='' |
---|
4526 | HAVE_WEBKIT_FALSE='' |
---|
4527 | HAVE_WEBKIT_TRUE='' |
---|
4528 | HAVE_WEBP_FALSE='' |
---|
4529 | HAVE_WEBP_TRUE='' |
---|
4530 | HAVE_WINDRES_FALSE='' |
---|
4531 | HAVE_WINDRES_TRUE='' |
---|
4532 | HAVE_XMLLINT_FALSE='' |
---|
4533 | HAVE_XMLLINT_TRUE='' |
---|
4534 | HAVE_XSLTPROC_FALSE='' |
---|
4535 | HAVE_XSLTPROC_TRUE='' |
---|
4536 | HAVE_XVFB_RUN_FALSE='' |
---|
4537 | HAVE_XVFB_RUN_TRUE='' |
---|
4538 | HTML_DIR='' |
---|
4539 | INSTALL_DATA='${INSTALL} -m 644' |
---|
4540 | INSTALL_PROGRAM='${INSTALL}' |
---|
4541 | INSTALL_SCRIPT='${INSTALL}' |
---|
4542 | INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' |
---|
4543 | INSTOBJEXT='' |
---|
4544 | INTLLIBS='' |
---|
4545 | INTLTOOL_CAVES_RULE='' |
---|
4546 | INTLTOOL_DESKTOP_RULE='' |
---|
4547 | INTLTOOL_DIRECTORY_RULE='' |
---|
4548 | INTLTOOL_EXTRACT='' |
---|
4549 | INTLTOOL_KBD_RULE='' |
---|
4550 | INTLTOOL_KEYS_RULE='' |
---|
4551 | INTLTOOL_MERGE='' |
---|
4552 | INTLTOOL_OAF_RULE='' |
---|
4553 | INTLTOOL_PERL='' |
---|
4554 | INTLTOOL_POLICY_RULE='' |
---|
4555 | INTLTOOL_PONG_RULE='' |
---|
4556 | INTLTOOL_PROP_RULE='' |
---|
4557 | INTLTOOL_REQUIRED_VERSION='0.40.1' |
---|
4558 | INTLTOOL_SCHEMAS_RULE='' |
---|
4559 | INTLTOOL_SERVER_RULE='' |
---|
4560 | INTLTOOL_SERVICE_RULE='' |
---|
4561 | INTLTOOL_SHEET_RULE='' |
---|
4562 | INTLTOOL_SOUNDLIST_RULE='' |
---|
4563 | INTLTOOL_THEME_RULE='' |
---|
4564 | INTLTOOL_UI_RULE='' |
---|
4565 | INTLTOOL_UPDATE='' |
---|
4566 | INTLTOOL_V_MERGE='' |
---|
4567 | INTLTOOL_V_MERGE_OPTIONS='' |
---|
4568 | INTLTOOL_XAM_RULE='' |
---|
4569 | INTLTOOL_XML_NOMERGE_RULE='' |
---|
4570 | INTLTOOL_XML_RULE='' |
---|
4571 | INTLTOOL__v_MERGE_0='' |
---|
4572 | INTLTOOL__v_MERGE_='' |
---|
4573 | INTL_MACOSX_LIBS='' |
---|
4574 | ISO_CODES_LOCALEDIR='' |
---|
4575 | ISO_CODES_LOCATION='' |
---|
4576 | JPEG_LIBS='' |
---|
4577 | LCMS_CFLAGS='' |
---|
4578 | LCMS_LIBS='' |
---|
4579 | LCMS_REQUIRED_VERSION='2.8' |
---|
4580 | LD='' |
---|
4581 | LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64' |
---|
4582 | LDFLAGS_FOR_BUILD='' |
---|
4583 | LIBLZMA_REQUIRED_VERSION='5.0.0' |
---|
4584 | LIBMYPAINT_CFLAGS='' |
---|
4585 | LIBMYPAINT_LIBS='' |
---|
4586 | LIBMYPAINT_REQUIRED_VERSION='1.3.0' |
---|
4587 | LIBOBJS='' |
---|
4588 | LIBPNG_REQUIRED_VERSION='1.6.25' |
---|
4589 | LIBS='' |
---|
4590 | LIBTOOL='' |
---|
4591 | LIPO='' |
---|
4592 | LN_S='' |
---|
4593 | LTLIBOBJS='' |
---|
4594 | LT_CURRENT_MINUS_AGE='0' |
---|
4595 | LT_SYS_LIBRARY_PATH='' |
---|
4596 | LT_VERSION_INFO='1000:0:1000' |
---|
4597 | LZMA_CFLAGS='' |
---|
4598 | LZMA_LIBS='' |
---|
4599 | MAIL='' |
---|
4600 | MAINT='' |
---|
4601 | MAINTAINER_MODE_FALSE='' |
---|
4602 | MAINTAINER_MODE_TRUE='' |
---|
4603 | MAKEINFO='${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.0/missing makeinfo' |
---|
4604 | MANIFEST_TOOL='' |
---|
4605 | MIME_INFO_CFLAGS='' |
---|
4606 | MIME_INFO_LIBS='' |
---|
4607 | MIME_TYPES='' |
---|
4608 | MKDIR_P='/opt/local/bin/gmkdir -p' |
---|
4609 | MKINSTALLDIRS='' |
---|
4610 | MMX_EXTRA_CFLAGS='' |
---|
4611 | MNG_CFLAGS='' |
---|
4612 | MNG_LIBS='' |
---|
4613 | MSGFMT='' |
---|
4614 | MSGFMT_OPTS='' |
---|
4615 | MSGMERGE='' |
---|
4616 | MS_LIB_AVAILABLE_FALSE='' |
---|
4617 | MS_LIB_AVAILABLE_TRUE='' |
---|
4618 | MYPAINT_BRUSHES_CFLAGS='' |
---|
4619 | MYPAINT_BRUSHES_LIBS='' |
---|
4620 | NATIVE_GLIB_CFLAGS='' |
---|
4621 | NATIVE_GLIB_LIBS='' |
---|
4622 | NM='' |
---|
4623 | NMEDIT='' |
---|
4624 | OBJDUMP='' |
---|
4625 | OBJEXT='o' |
---|
4626 | OPENEXR_CFLAGS='' |
---|
4627 | OPENEXR_LIBS='' |
---|
4628 | OPENEXR_REQUIRED_VERSION='1.6.1' |
---|
4629 | OPENJPEG_CFLAGS='' |
---|
4630 | OPENJPEG_LIBS='' |
---|
4631 | OS_UNIX_FALSE='' |
---|
4632 | OS_UNIX_TRUE='' |
---|
4633 | OS_WIN32_FALSE='' |
---|
4634 | OS_WIN32_TRUE='' |
---|
4635 | OTOOL64='' |
---|
4636 | OTOOL='' |
---|
4637 | PACKAGE='gimp' |
---|
4638 | PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP' |
---|
4639 | PACKAGE_NAME='GIMP' |
---|
4640 | PACKAGE_STRING='GIMP 2.10.0' |
---|
4641 | PACKAGE_TARNAME='gimp' |
---|
4642 | PACKAGE_URL='' |
---|
4643 | PACKAGE_VERSION='2.10.0' |
---|
4644 | PANGOCAIRO_CFLAGS='' |
---|
4645 | PANGOCAIRO_LIBS='' |
---|
4646 | PANGOCAIRO_REQUIRED_VERSION='1.29.4' |
---|
4647 | PATHSEP='' |
---|
4648 | PATH_SEPARATOR=':' |
---|
4649 | PERL='/opt/local/bin/perl5.26' |
---|
4650 | PERL_REQUIRED_VERSION='5.10.0' |
---|
4651 | PERL_VERSION='' |
---|
4652 | PKG_CONFIG='' |
---|
4653 | PKG_CONFIG_LIBDIR='' |
---|
4654 | PKG_CONFIG_PATH='/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig' |
---|
4655 | PLATFORM_OSX_FALSE='' |
---|
4656 | PLATFORM_OSX_QUARTZ_FALSE='' |
---|
4657 | PLATFORM_OSX_QUARTZ_TRUE='' |
---|
4658 | PLATFORM_OSX_TRUE='' |
---|
4659 | PLATFORM_WIN32_FALSE='' |
---|
4660 | PLATFORM_WIN32_TRUE='' |
---|
4661 | PNG_CFLAGS='' |
---|
4662 | PNG_LIBS='' |
---|
4663 | POFILES='' |
---|
4664 | POPPLER_CFLAGS='' |
---|
4665 | POPPLER_DATA_CFLAGS='' |
---|
4666 | POPPLER_DATA_LIBS='' |
---|
4667 | POPPLER_DATA_REQUIRED_VERSION='0.4.7' |
---|
4668 | POPPLER_LIBS='' |
---|
4669 | POPPLER_REQUIRED_VERSION='0.44.0' |
---|
4670 | POSUB='' |
---|
4671 | PO_IN_DATADIR_FALSE='' |
---|
4672 | PO_IN_DATADIR_TRUE='' |
---|
4673 | PYBIN_PATH='' |
---|
4674 | PYCAIRO_CFLAGS='' |
---|
4675 | PYCAIRO_LIBS='' |
---|
4676 | PYGIMP_EXTRA_CFLAGS='' |
---|
4677 | PYGTK_CFLAGS='' |
---|
4678 | PYGTK_CODEGEN='' |
---|
4679 | PYGTK_DEFSDIR='' |
---|
4680 | PYGTK_LIBS='' |
---|
4681 | PYLINK_LIBS='' |
---|
4682 | PYTHON2_REQUIRED_VERSION='2.5.0' |
---|
4683 | PYTHON='/opt/local/bin/python2.7' |
---|
4684 | PYTHON_EXEC_PREFIX='' |
---|
4685 | PYTHON_INCLUDES='' |
---|
4686 | PYTHON_PLATFORM='' |
---|
4687 | PYTHON_PREFIX='' |
---|
4688 | PYTHON_VERSION='' |
---|
4689 | RANLIB='' |
---|
4690 | RECOMMENDED_WIN32_GTK_CFLAGS='' |
---|
4691 | RECOMMENDED_WIN32_GTK_LIBS='' |
---|
4692 | RSVG_REQUIRED_VERSION='2.40.6' |
---|
4693 | RT_LIBS='' |
---|
4694 | SCREENSHOT_LIBS='' |
---|
4695 | SED='' |
---|
4696 | SENDMAIL='' |
---|
4697 | SET_MAKE='' |
---|
4698 | SHELL='/bin/sh' |
---|
4699 | SOCKET_LIBS='' |
---|
4700 | SSE2_EXTRA_CFLAGS='' |
---|
4701 | SSE4_1_EXTRA_CFLAGS='' |
---|
4702 | SSE_EXTRA_CFLAGS='' |
---|
4703 | STATICLIBS_FALSE='' |
---|
4704 | STATICLIBS_TRUE='' |
---|
4705 | STRIP='' |
---|
4706 | SVG_CFLAGS='' |
---|
4707 | SVG_LIBS='' |
---|
4708 | SYMPREFIX='' |
---|
4709 | TIFF_LIBS='' |
---|
4710 | USE_BINRELOC_FALSE='' |
---|
4711 | USE_BINRELOC_TRUE='' |
---|
4712 | USE_NLS='' |
---|
4713 | VERSION='2.10.0' |
---|
4714 | WEBKIT_CFLAGS='' |
---|
4715 | WEBKIT_LIBS='' |
---|
4716 | WEBKIT_REQUIRED_VERSION='1.6.1' |
---|
4717 | WEBPDEMUX_CFLAGS='' |
---|
4718 | WEBPDEMUX_LIBS='' |
---|
4719 | WEBPMUX_CFLAGS='' |
---|
4720 | WEBPMUX_LIBS='' |
---|
4721 | WEBP_CFLAGS='' |
---|
4722 | WEBP_LIBS='' |
---|
4723 | WEBP_REQUIRED_VERSION='0.6.0' |
---|
4724 | WEB_PAGE='' |
---|
4725 | WIN32_LARGE_ADDRESS_AWARE='' |
---|
4726 | WINDRES='' |
---|
4727 | WITH_PDBGEN_FALSE='' |
---|
4728 | WITH_PDBGEN_TRUE='' |
---|
4729 | WMF_CFLAGS='' |
---|
4730 | WMF_CONFIG='' |
---|
4731 | WMF_LIBS='' |
---|
4732 | WMF_REQUIRED_VERSION='0.2.8' |
---|
4733 | XDG_EMAIL='' |
---|
4734 | XFIXES_CFLAGS='' |
---|
4735 | XFIXES_LIBS='' |
---|
4736 | XGETTEXT='' |
---|
4737 | XGETTEXT_RECOMMENDED_VERSION='0.19' |
---|
4738 | XMC_CFLAGS='' |
---|
4739 | XMC_LIBS='' |
---|
4740 | XMKMF='' |
---|
4741 | XMLLINT='' |
---|
4742 | XMU_LIBS='' |
---|
4743 | XPM_LIBS='' |
---|
4744 | XSLTPROC='' |
---|
4745 | XVFB_RUN='' |
---|
4746 | X_CFLAGS='' |
---|
4747 | X_EXTRA_LIBS='' |
---|
4748 | X_LIBS='' |
---|
4749 | X_PRE_LIBS='' |
---|
4750 | Z_LIBS='' |
---|
4751 | ac_ct_AR='' |
---|
4752 | ac_ct_CC='/usr/bin/clang' |
---|
4753 | ac_ct_CC_FOR_BUILD='/usr/bin/clang' |
---|
4754 | ac_ct_CXX='' |
---|
4755 | ac_ct_DUMPBIN='' |
---|
4756 | am__EXEEXT_FALSE='' |
---|
4757 | am__EXEEXT_TRUE='' |
---|
4758 | am__fastdepCCAS_FALSE='' |
---|
4759 | am__fastdepCCAS_TRUE='' |
---|
4760 | am__fastdepCC_FALSE='#' |
---|
4761 | am__fastdepCC_TRUE='' |
---|
4762 | am__fastdepCXX_FALSE='#' |
---|
4763 | am__fastdepCXX_TRUE='' |
---|
4764 | am__include='include' |
---|
4765 | am__isrc='' |
---|
4766 | am__leading_dot='.' |
---|
4767 | am__nodep='_no' |
---|
4768 | am__quote='' |
---|
4769 | am__tar='$${TAR-tar} chof - "$$tardir"' |
---|
4770 | am__untar='$${TAR-tar} xf -' |
---|
4771 | bindir='${exec_prefix}/bin' |
---|
4772 | build='x86_64-apple-darwin13.4.0' |
---|
4773 | build_alias='x86_64-apple-darwin13.4.0' |
---|
4774 | build_cpu='x86_64' |
---|
4775 | build_os='darwin13.4.0' |
---|
4776 | build_vendor='apple' |
---|
4777 | datadir='${datarootdir}' |
---|
4778 | datarootdir='${prefix}/share' |
---|
4779 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' |
---|
4780 | dvidir='${docdir}' |
---|
4781 | exec_prefix='NONE' |
---|
4782 | gimpdatadir='' |
---|
4783 | gimpdir='' |
---|
4784 | gimplocaledir='' |
---|
4785 | gimpplugindir='' |
---|
4786 | gimpsysconfdir='' |
---|
4787 | host='x86_64-apple-darwin13.4.0' |
---|
4788 | host_alias='' |
---|
4789 | host_cpu='x86_64' |
---|
4790 | host_os='darwin13.4.0' |
---|
4791 | host_vendor='apple' |
---|
4792 | htmldir='${docdir}' |
---|
4793 | includedir='${prefix}/include' |
---|
4794 | infodir='${datarootdir}/info' |
---|
4795 | install_sh='${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_gimp2/gimp2/work/gimp-2.10.0/install-sh' |
---|
4796 | intltool__v_merge_options_0='' |
---|
4797 | intltool__v_merge_options_='' |
---|
4798 | libdir='${exec_prefix}/lib' |
---|
4799 | libexecdir='${exec_prefix}/libexec' |
---|
4800 | localedir='${datarootdir}/locale' |
---|
4801 | localstatedir='${prefix}/var' |
---|
4802 | mandir='${datarootdir}/man' |
---|
4803 | manpage_gimpdir='' |
---|
4804 | mkdir_p='$(MKDIR_P)' |
---|
4805 | ms_librarian='' |
---|
4806 | mypaint_brushes_dir='' |
---|
4807 | oldincludedir='/usr/include' |
---|
4808 | pdfdir='${docdir}' |
---|
4809 | pkgpyexecdir='' |
---|
4810 | pkgpythondir='' |
---|
4811 | prefix='/opt/local' |
---|
4812 | program_transform_name='s,x,x,' |
---|
4813 | psdir='${docdir}' |
---|
4814 | pyexecdir='' |
---|
4815 | pythondir='' |
---|
4816 | sbindir='${exec_prefix}/sbin' |
---|
4817 | sharedstatedir='${prefix}/com' |
---|
4818 | sysconfdir='${prefix}/etc' |
---|
4819 | target_alias='' |
---|
4820 | |
---|
4821 | ## ----------- ## |
---|
4822 | ## confdefs.h. ## |
---|
4823 | ## ----------- ## |
---|
4824 | |
---|
4825 | /* confdefs.h */ |
---|
4826 | #define PACKAGE_NAME "GIMP" |
---|
4827 | #define PACKAGE_TARNAME "gimp" |
---|
4828 | #define PACKAGE_VERSION "2.10.0" |
---|
4829 | #define PACKAGE_STRING "GIMP 2.10.0" |
---|
4830 | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" |
---|
4831 | #define PACKAGE_URL "" |
---|
4832 | #define GETTEXT_PACKAGE "gimp20" |
---|
4833 | |
---|
4834 | configure: exit 1 |
---|