[ 0:01] compiling /home/xrockai/src/divine/nightly/test/libcxx/algorithms/is_permutation.pass.cpp [ 0:01] In file included from /home/xrockai/src/divine/nightly/test/libcxx/algorithms/is_permutation.pass.cpp:19: [ 0:01] In file included from /dios/libcxx/include/algorithm:639: [ 0:01] In file included from /dios/libcxx/include/initializer_list:46: [ 0:01] In file included from /dios/libcxx/include/cstddef:44: [ 0:01] In file included from /dios/include/stddef.h:10: [ 0:01] In file included from /dios/include/_PDCLIB/int.h:16: [ 0:01] /dios/include/_PDCLIB/cdefs.h:69:10: warning: Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:01] #warning Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:01] ^ [ 0:01] 1 warning generated. [ 0:02] compiling /dios/lib/config/seqklee.bc [ 0:02] setting up pass: functionmeta, options = [ 0:03] setting up pass: fuse-ctors, options = [ 0:03] KLEE: output directory is "/var/obj/divine-nightly/semidbg/test/__test_work_dir.8/_klee_out" [ 0:05] KLEE: Using Z3 solver backend [ 0:05] WARNING: this target does not support the llvm.stacksave intrinsic. [ 0:05] warning: Linking two modules of different target triples: klee_div_zero_check.bc' is 'x86_64-unknown-linux-gnu' whereas 'klee.bc' is 'x86_64-unknown-none-elf' [ 0:05] [ 0:05] KLEE: WARNING: undefined reference to function: __dios_tainted_init [ 0:07] KLEE: WARNING: undefined reference to function: klee_free [ 0:07] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:07] i:1 [ 0:07] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:07] about to __boot:0 [ 0:07] about to run the scheduler:0 [ 0:07] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:07] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:07] KLEE: NOTE: now ignoring this error at this location [ 0:07] KLEE: ERROR: EXITING ON ERROR: [ 0:07] Error: failed external call: __dios_tainted_init [ 0:07] File: /dios/libc/sys/start.cpp [ 0:07] Line: 87 [ 0:07] assembly.ll line: 34643 [ 0:07] Stack: [ 0:07] #000034643 in __dios_start (l=2, argc=1, argv=94892526252552, envp=94892526329864) at /dios/libc/sys/start.cpp:87 [ 0:07] #100010669 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:07] #200042908 in klee_boot (argc=2, argv=94892500818688) at /dios/arch/klee/boot.c:41 [ 0:07] [ 0:07] [ 0:07] 1 /* TAGS: c++ fin */ [ 0:07] 2 /* CC_OPTS: -std=c++2a */ [ 0:07] 3 /* VERIFY_OPTS: -o nofail:malloc */ [ 0:07] 4 //===----------------------------------------------------------------------===// [ 0:07] 5 // [ 0:07] 6 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. [ 0:07] 7 // See https://llvm.org/LICENSE.txt for license information. [ 0:07] 8 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception [ 0:07] 9 // [ 0:07] 10 //===----------------------------------------------------------------------===// [ 0:07] 11 [ 0:07] 12 // [ 0:07] 13 [ 0:07] 14 // template [ 0:07] 15 // constexpr bool // constexpr after C++17 [ 0:07] 16 // is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, [ 0:07] 17 // ForwardIterator2 first2); [ 0:07] 18 [ 0:07] 19 #include [ 0:07] 20 #include [ 0:07] 21 [ 0:07] 22 #include "test_iterators.h" [ 0:07] 23 [ 0:07] 24 #include "test_macros.h" [ 0:07] 25 [ 0:07] 26 #if TEST_STD_VER > 17 [ 0:07] 27 TEST_CONSTEXPR bool test_constexpr() { [ 0:07] 28 int ia[] = {0, 0, 0}; [ 0:07] 29 int ib[] = {1, 1, 0}; [ 0:07] 30 int ic[] = {1, 0, 1}; [ 0:07] 31 int id[] = {1}; [ 0:07] 32 return !std::is_permutation(std::begin(ia), std::end(ia), std::begin(ib)) [ 0:07] 33 && !std::is_permutation(std::begin(ia), std::end(ia), std::begin(ib), std::end(ib)) [ 0:07] 34 && std::is_permutation(std::begin(ib), std::end(ib), std::begin(ic)) [ 0:07] 35 && std::is_permutation(std::begin(ib), std::end(ib), std::begin(ic), std::end(ic)) [ 0:07] 36 && !std::is_permutation(std::begin(ic), std::end(ic), std::begin(id), std::end(id)) [ 0:07] 37 ; [ 0:07] 38 } [ 0:07] 39 #endif [ 0:07] 40 [ 0:07] 41 int main(int, char**) [ 0:07] 42 { [ 0:07] 43 { [ 0:07] 44 const int ia[] = {0}; [ 0:07] 45 const int ib[] = {0}; [ 0:07] 46 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 47 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 48 forward_iterator(ia + 0), [ 0:07] 49 forward_iterator(ib)) == true); [ 0:07] 50 #if TEST_STD_VER >= 14 [ 0:07] 51 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 52 forward_iterator(ia + 0), [ 0:07] 53 forward_iterator(ib), [ 0:07] 54 forward_iterator(ib + 0)) == true); [ 0:07] 55 #endif [ 0:07] 56 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 57 forward_iterator(ia + sa), [ 0:07] 58 forward_iterator(ib)) == true); [ 0:07] 59 #if TEST_STD_VER >= 14 [ 0:07] 60 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 61 forward_iterator(ia + sa), [ 0:07] 62 forward_iterator(ib), [ 0:07] 63 forward_iterator(ib + sa)) == true); [ 0:07] 64 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 65 forward_iterator(ia + sa), [ 0:07] 66 forward_iterator(ib), [ 0:07] 67 forward_iterator(ib + sa - 1)) == false); [ 0:07] 68 #endif [ 0:07] 69 } [ 0:07] 70 { [ 0:07] 71 const int ia[] = {0}; [ 0:07] 72 const int ib[] = {1}; [ 0:07] 73 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 74 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 75 forward_iterator(ia + sa), [ 0:07] 76 forward_iterator(ib)) == false); [ 0:07] 77 #if TEST_STD_VER >= 14 [ 0:07] 78 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 79 forward_iterator(ia + sa), [ 0:07] 80 forward_iterator(ib), [ 0:07] 81 forward_iterator(ib + sa)) == false); [ 0:07] 82 #endif [ 0:07] 83 } [ 0:07] 84 [ 0:07] 85 { [ 0:07] 86 const int ia[] = {0, 0}; [ 0:07] 87 const int ib[] = {0, 0}; [ 0:07] 88 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 89 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 90 forward_iterator(ia + sa), [ 0:07] 91 forward_iterator(ib)) == true); [ 0:07] 92 #if TEST_STD_VER >= 14 [ 0:07] 93 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 94 forward_iterator(ia + sa), [ 0:07] 95 forward_iterator(ib), [ 0:07] 96 forward_iterator(ib + sa)) == true); [ 0:07] 97 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 98 forward_iterator(ia + sa), [ 0:07] 99 forward_iterator(ib), [ 0:07] 100 forward_iterator(ib + sa - 1)) == false); [ 0:07] 101 #endif [ 0:07] 102 } [ 0:07] 103 { [ 0:07] 104 const int ia[] = {0, 0}; [ 0:07] 105 const int ib[] = {0, 1}; [ 0:07] 106 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 107 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 108 forward_iterator(ia + sa), [ 0:07] 109 forward_iterator(ib)) == false); [ 0:07] 110 #if TEST_STD_VER >= 14 [ 0:07] 111 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 112 forward_iterator(ia + sa), [ 0:07] 113 forward_iterator(ib), [ 0:07] 114 forward_iterator(ib + sa)) == false); [ 0:07] 115 #endif [ 0:07] 116 } [ 0:07] 117 { [ 0:07] 118 const int ia[] = {0, 0}; [ 0:07] 119 const int ib[] = {1, 0}; [ 0:07] 120 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 121 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 122 forward_iterator(ia + sa), [ 0:07] 123 forward_iterator(ib)) == false); [ 0:07] 124 #if TEST_STD_VER >= 14 [ 0:07] 125 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 126 forward_iterator(ia + sa), [ 0:07] 127 forward_iterator(ib), [ 0:07] 128 forward_iterator(ib + sa)) == false); [ 0:07] 129 #endif [ 0:07] 130 } [ 0:07] 131 { [ 0:07] 132 const int ia[] = {0, 0}; [ 0:07] 133 const int ib[] = {1, 1}; [ 0:07] 134 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 135 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 136 forward_iterator(ia + sa), [ 0:07] 137 forward_iterator(ib)) == false); [ 0:07] 138 #if TEST_STD_VER >= 14 [ 0:07] 139 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 140 forward_iterator(ia + sa), [ 0:07] 141 forward_iterator(ib), [ 0:07] 142 forward_iterator(ib + sa)) == false); [ 0:07] 143 #endif [ 0:07] 144 } [ 0:07] 145 { [ 0:07] 146 const int ia[] = {0, 1}; [ 0:07] 147 const int ib[] = {0, 0}; [ 0:07] 148 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 149 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 150 forward_iterator(ia + sa), [ 0:07] 151 forward_iterator(ib)) == false); [ 0:07] 152 #if TEST_STD_VER >= 14 [ 0:07] 153 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 154 forward_iterator(ia + sa), [ 0:07] 155 forward_iterator(ib), [ 0:07] 156 forward_iterator(ib + sa)) == false); [ 0:07] 157 #endif [ 0:07] 158 } [ 0:07] 159 { [ 0:07] 160 const int ia[] = {0, 1}; [ 0:07] 161 const int ib[] = {0, 1}; [ 0:07] 162 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 163 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 164 forward_iterator(ia + sa), [ 0:07] 165 forward_iterator(ib)) == true); [ 0:07] 166 #if TEST_STD_VER >= 14 [ 0:07] 167 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 168 forward_iterator(ia + sa), [ 0:07] 169 forward_iterator(ib), [ 0:07] 170 forward_iterator(ib + sa)) == true); [ 0:07] 171 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 172 forward_iterator(ia + sa), [ 0:07] 173 forward_iterator(ib), [ 0:07] 174 forward_iterator(ib + sa - 1)) == false); [ 0:07] 175 #endif [ 0:07] 176 } [ 0:07] 177 { [ 0:07] 178 const int ia[] = {0, 1}; [ 0:07] 179 const int ib[] = {1, 0}; [ 0:07] 180 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 181 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 182 forward_iterator(ia + sa), [ 0:07] 183 forward_iterator(ib)) == true); [ 0:07] 184 #if TEST_STD_VER >= 14 [ 0:07] 185 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 186 forward_iterator(ia + sa), [ 0:07] 187 forward_iterator(ib), [ 0:07] 188 forward_iterator(ib + sa)) == true); [ 0:07] 189 #endif [ 0:07] 190 } [ 0:07] 191 { [ 0:07] 192 const int ia[] = {0, 1}; [ 0:07] 193 const int ib[] = {1, 1}; [ 0:07] 194 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 195 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 196 forward_iterator(ia + sa), [ 0:07] 197 forward_iterator(ib)) == false); [ 0:07] 198 #if TEST_STD_VER >= 14 [ 0:07] 199 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 200 forward_iterator(ia + sa), [ 0:07] 201 forward_iterator(ib), [ 0:07] 202 forward_iterator(ib + sa)) == false); [ 0:07] 203 #endif [ 0:07] 204 } [ 0:07] 205 { [ 0:07] 206 const int ia[] = {1, 0}; [ 0:07] 207 const int ib[] = {0, 0}; [ 0:07] 208 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 209 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 210 forward_iterator(ia + sa), [ 0:07] 211 forward_iterator(ib)) == false); [ 0:07] 212 #if TEST_STD_VER >= 14 [ 0:07] 213 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 214 forward_iterator(ia + sa), [ 0:07] 215 forward_iterator(ib), [ 0:07] 216 forward_iterator(ib + sa)) == false); [ 0:07] 217 #endif [ 0:07] 218 } [ 0:07] 219 { [ 0:07] 220 const int ia[] = {1, 0}; [ 0:07] 221 const int ib[] = {0, 1}; [ 0:07] 222 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 223 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 224 forward_iterator(ia + sa), [ 0:07] 225 forward_iterator(ib)) == true); [ 0:07] 226 #if TEST_STD_VER >= 14 [ 0:07] 227 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 228 forward_iterator(ia + sa), [ 0:07] 229 forward_iterator(ib), [ 0:07] 230 forward_iterator(ib + sa)) == true); [ 0:07] 231 #endif [ 0:07] 232 } [ 0:07] 233 { [ 0:07] 234 const int ia[] = {1, 0}; [ 0:07] 235 const int ib[] = {1, 0}; [ 0:07] 236 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 237 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 238 forward_iterator(ia + sa), [ 0:07] 239 forward_iterator(ib)) == true); [ 0:07] 240 #if TEST_STD_VER >= 14 [ 0:07] 241 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 242 forward_iterator(ia + sa), [ 0:07] 243 forward_iterator(ib), [ 0:07] 244 forward_iterator(ib + sa)) == true); [ 0:07] 245 #endif [ 0:07] 246 } [ 0:07] 247 { [ 0:07] 248 const int ia[] = {1, 0}; [ 0:07] 249 const int ib[] = {1, 1}; [ 0:07] 250 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 251 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 252 forward_iterator(ia + sa), [ 0:07] 253 forward_iterator(ib)) == false); [ 0:07] 254 #if TEST_STD_VER >= 14 [ 0:07] 255 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 256 forward_iterator(ia + sa), [ 0:07] 257 forward_iterator(ib), [ 0:07] 258 forward_iterator(ib + sa)) == false); [ 0:07] 259 #endif [ 0:07] 260 } [ 0:07] 261 { [ 0:07] 262 const int ia[] = {1, 1}; [ 0:07] 263 const int ib[] = {0, 0}; [ 0:07] 264 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 265 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 266 forward_iterator(ia + sa), [ 0:07] 267 forward_iterator(ib)) == false); [ 0:07] 268 #if TEST_STD_VER >= 14 [ 0:07] 269 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 270 forward_iterator(ia + sa), [ 0:07] 271 forward_iterator(ib), [ 0:07] 272 forward_iterator(ib + sa)) == false); [ 0:07] 273 #endif [ 0:07] 274 } [ 0:07] 275 { [ 0:07] 276 const int ia[] = {1, 1}; [ 0:07] 277 const int ib[] = {0, 1}; [ 0:07] 278 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 279 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 280 forward_iterator(ia + sa), [ 0:07] 281 forward_iterator(ib)) == false); [ 0:07] 282 #if TEST_STD_VER >= 14 [ 0:07] 283 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 284 forward_iterator(ia + sa), [ 0:07] 285 forward_iterator(ib), [ 0:07] 286 forward_iterator(ib + sa)) == false); [ 0:07] 287 #endif [ 0:07] 288 } [ 0:07] 289 { [ 0:07] 290 const int ia[] = {1, 1}; [ 0:07] 291 const int ib[] = {1, 0}; [ 0:07] 292 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 293 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 294 forward_iterator(ia + sa), [ 0:07] 295 forward_iterator(ib)) == false); [ 0:07] 296 #if TEST_STD_VER >= 14 [ 0:07] 297 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 298 forward_iterator(ia + sa), [ 0:07] 299 forward_iterator(ib), [ 0:07] 300 forward_iterator(ib + sa)) == false); [ 0:07] 301 #endif [ 0:07] 302 } [ 0:07] 303 { [ 0:07] 304 const int ia[] = {1, 1}; [ 0:07] 305 const int ib[] = {1, 1}; [ 0:07] 306 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 307 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 308 forward_iterator(ia + sa), [ 0:07] 309 forward_iterator(ib)) == true); [ 0:07] 310 #if TEST_STD_VER >= 14 [ 0:07] 311 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 312 forward_iterator(ia + sa), [ 0:07] 313 forward_iterator(ib), [ 0:07] 314 forward_iterator(ib + sa)) == true); [ 0:07] 315 #endif [ 0:07] 316 } [ 0:07] 317 [ 0:07] 318 { [ 0:07] 319 const int ia[] = {0, 0, 0}; [ 0:07] 320 const int ib[] = {1, 0, 0}; [ 0:07] 321 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 322 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 323 forward_iterator(ia + sa), [ 0:07] 324 forward_iterator(ib)) == false); [ 0:07] 325 #if TEST_STD_VER >= 14 [ 0:07] 326 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 327 forward_iterator(ia + sa), [ 0:07] 328 forward_iterator(ib), [ 0:07] 329 forward_iterator(ib + sa)) == false); [ 0:07] 330 #endif [ 0:07] 331 } [ 0:07] 332 { [ 0:07] 333 const int ia[] = {0, 0, 0}; [ 0:07] 334 const int ib[] = {1, 0, 1}; [ 0:07] 335 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 336 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 337 forward_iterator(ia + sa), [ 0:07] 338 forward_iterator(ib)) == false); [ 0:07] 339 #if TEST_STD_VER >= 14 [ 0:07] 340 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 341 forward_iterator(ia + sa), [ 0:07] 342 forward_iterator(ib), [ 0:07] 343 forward_iterator(ib + sa)) == false); [ 0:07] 344 #endif [ 0:07] 345 } [ 0:07] 346 { [ 0:07] 347 const int ia[] = {0, 0, 0}; [ 0:07] 348 const int ib[] = {1, 0, 2}; [ 0:07] 349 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 350 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 351 forward_iterator(ia + sa), [ 0:07] 352 forward_iterator(ib)) == false); [ 0:07] 353 #if TEST_STD_VER >= 14 [ 0:07] 354 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 355 forward_iterator(ia + sa), [ 0:07] 356 forward_iterator(ib), [ 0:07] 357 forward_iterator(ib + sa)) == false); [ 0:07] 358 #endif [ 0:07] 359 } [ 0:07] 360 { [ 0:07] 361 const int ia[] = {0, 0, 0}; [ 0:07] 362 const int ib[] = {1, 1, 0}; [ 0:07] 363 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 364 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 365 forward_iterator(ia + sa), [ 0:07] 366 forward_iterator(ib)) == false); [ 0:07] 367 #if TEST_STD_VER >= 14 [ 0:07] 368 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 369 forward_iterator(ia + sa), [ 0:07] 370 forward_iterator(ib), [ 0:07] 371 forward_iterator(ib + sa)) == false); [ 0:07] 372 #endif [ 0:07] 373 } [ 0:07] 374 { [ 0:07] 375 const int ia[] = {0, 0, 0}; [ 0:07] 376 const int ib[] = {1, 1, 1}; [ 0:07] 377 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 378 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 379 forward_iterator(ia + sa), [ 0:07] 380 forward_iterator(ib)) == false); [ 0:07] 381 #if TEST_STD_VER >= 14 [ 0:07] 382 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 383 forward_iterator(ia + sa), [ 0:07] 384 forward_iterator(ib), [ 0:07] 385 forward_iterator(ib + sa)) == false); [ 0:07] 386 #endif [ 0:07] 387 } [ 0:07] 388 { [ 0:07] 389 const int ia[] = {0, 0, 0}; [ 0:07] 390 const int ib[] = {1, 1, 2}; [ 0:07] 391 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 392 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 393 forward_iterator(ia + sa), [ 0:07] 394 forward_iterator(ib)) == false); [ 0:07] 395 #if TEST_STD_VER >= 14 [ 0:07] 396 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 397 forward_iterator(ia + sa), [ 0:07] 398 forward_iterator(ib), [ 0:07] 399 forward_iterator(ib + sa)) == false); [ 0:07] 400 #endif [ 0:07] 401 } [ 0:07] 402 { [ 0:07] 403 const int ia[] = {0, 0, 0}; [ 0:07] 404 const int ib[] = {1, 2, 0}; [ 0:07] 405 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 406 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 407 forward_iterator(ia + sa), [ 0:07] 408 forward_iterator(ib)) == false); [ 0:07] 409 #if TEST_STD_VER >= 14 [ 0:07] 410 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 411 forward_iterator(ia + sa), [ 0:07] 412 forward_iterator(ib), [ 0:07] 413 forward_iterator(ib + sa)) == false); [ 0:07] 414 #endif [ 0:07] 415 } [ 0:07] 416 { [ 0:07] 417 const int ia[] = {0, 0, 0}; [ 0:07] 418 const int ib[] = {1, 2, 1}; [ 0:07] 419 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 420 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 421 forward_iterator(ia + sa), [ 0:07] 422 forward_iterator(ib)) == false); [ 0:07] 423 #if TEST_STD_VER >= 14 [ 0:07] 424 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 425 forward_iterator(ia + sa), [ 0:07] 426 forward_iterator(ib), [ 0:07] 427 forward_iterator(ib + sa)) == false); [ 0:07] 428 #endif [ 0:07] 429 } [ 0:07] 430 { [ 0:07] 431 const int ia[] = {0, 0, 0}; [ 0:07] 432 const int ib[] = {1, 2, 2}; [ 0:07] 433 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 434 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 435 forward_iterator(ia + sa), [ 0:07] 436 forward_iterator(ib)) == false); [ 0:07] 437 #if TEST_STD_VER >= 14 [ 0:07] 438 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 439 forward_iterator(ia + sa), [ 0:07] 440 forward_iterator(ib), [ 0:07] 441 forward_iterator(ib + sa)) == false); [ 0:07] 442 #endif [ 0:07] 443 } [ 0:07] 444 { [ 0:07] 445 const int ia[] = {0, 0, 1}; [ 0:07] 446 const int ib[] = {1, 0, 0}; [ 0:07] 447 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 448 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 449 forward_iterator(ia + sa), [ 0:07] 450 forward_iterator(ib)) == true); [ 0:07] 451 #if TEST_STD_VER >= 14 [ 0:07] 452 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 453 forward_iterator(ia + sa), [ 0:07] 454 forward_iterator(ib), [ 0:07] 455 forward_iterator(ib + sa)) == true); [ 0:07] 456 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 457 forward_iterator(ia + sa), [ 0:07] 458 forward_iterator(ib), [ 0:07] 459 forward_iterator(ib + sa - 1)) == false); [ 0:07] 460 #endif [ 0:07] 461 } [ 0:07] 462 { [ 0:07] 463 const int ia[] = {0, 0, 1}; [ 0:07] 464 const int ib[] = {1, 0, 1}; [ 0:07] 465 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 466 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 467 forward_iterator(ia + sa), [ 0:07] 468 forward_iterator(ib)) == false); [ 0:07] 469 #if TEST_STD_VER >= 14 [ 0:07] 470 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 471 forward_iterator(ia + sa), [ 0:07] 472 forward_iterator(ib), [ 0:07] 473 forward_iterator(ib + sa)) == false); [ 0:07] 474 #endif [ 0:07] 475 } [ 0:07] 476 { [ 0:07] 477 const int ia[] = {0, 1, 2}; [ 0:07] 478 const int ib[] = {1, 0, 2}; [ 0:07] 479 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 480 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 481 forward_iterator(ia + sa), [ 0:07] 482 forward_iterator(ib)) == true); [ 0:07] 483 #if TEST_STD_VER >= 14 [ 0:07] 484 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 485 forward_iterator(ia + sa), [ 0:07] 486 forward_iterator(ib), [ 0:07] 487 forward_iterator(ib + sa)) == true); [ 0:07] 488 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 489 forward_iterator(ia + sa), [ 0:07] 490 forward_iterator(ib), [ 0:07] 491 forward_iterator(ib + sa - 1)) == false); [ 0:07] 492 #endif [ 0:07] 493 } [ 0:07] 494 { [ 0:07] 495 const int ia[] = {0, 1, 2}; [ 0:07] 496 const int ib[] = {1, 2, 0}; [ 0:07] 497 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 498 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 499 forward_iterator(ia + sa), [ 0:07] 500 forward_iterator(ib)) == true); [ 0:07] 501 #if TEST_STD_VER >= 14 [ 0:07] 502 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 503 forward_iterator(ia + sa), [ 0:07] 504 forward_iterator(ib), [ 0:07] 505 forward_iterator(ib + sa)) == true); [ 0:07] 506 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 507 forward_iterator(ia + sa), [ 0:07] 508 forward_iterator(ib), [ 0:07] 509 forward_iterator(ib + sa - 1)) == false); [ 0:07] 510 #endif [ 0:07] 511 } [ 0:07] 512 { [ 0:07] 513 const int ia[] = {0, 1, 2}; [ 0:07] 514 const int ib[] = {2, 1, 0}; [ 0:07] 515 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 516 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 517 forward_iterator(ia + sa), [ 0:07] 518 forward_iterator(ib)) == true); [ 0:07] 519 #if TEST_STD_VER >= 14 [ 0:07] 520 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 521 forward_iterator(ia + sa), [ 0:07] 522 forward_iterator(ib), [ 0:07] 523 forward_iterator(ib + sa)) == true); [ 0:07] 524 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 525 forward_iterator(ia + sa), [ 0:07] 526 forward_iterator(ib), [ 0:07] 527 forward_iterator(ib + sa - 1)) == false); [ 0:07] 528 #endif [ 0:07] 529 } [ 0:07] 530 { [ 0:07] 531 const int ia[] = {0, 1, 2}; [ 0:07] 532 const int ib[] = {2, 0, 1}; [ 0:07] 533 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 534 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 535 forward_iterator(ia + sa), [ 0:07] 536 forward_iterator(ib)) == true); [ 0:07] 537 #if TEST_STD_VER >= 14 [ 0:07] 538 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 539 forward_iterator(ia + sa), [ 0:07] 540 forward_iterator(ib), [ 0:07] 541 forward_iterator(ib + sa)) == true); [ 0:07] 542 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 543 forward_iterator(ia + sa), [ 0:07] 544 forward_iterator(ib), [ 0:07] 545 forward_iterator(ib + sa - 1)) == false); [ 0:07] 546 #endif [ 0:07] 547 } [ 0:07] 548 { [ 0:07] 549 const int ia[] = {0, 0, 1}; [ 0:07] 550 const int ib[] = {1, 0, 1}; [ 0:07] 551 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 552 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 553 forward_iterator(ia + sa), [ 0:07] 554 forward_iterator(ib)) == false); [ 0:07] 555 #if TEST_STD_VER >= 14 [ 0:07] 556 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 557 forward_iterator(ia + sa), [ 0:07] 558 forward_iterator(ib), [ 0:07] 559 forward_iterator(ib + sa)) == false); [ 0:07] 560 #endif [ 0:07] 561 } [ 0:07] 562 { [ 0:07] 563 const int ia[] = {0, 0, 1}; [ 0:07] 564 const int ib[] = {1, 0, 0}; [ 0:07] 565 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 566 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 567 forward_iterator(ia + sa), [ 0:07] 568 forward_iterator(ib)) == true); [ 0:07] 569 #if TEST_STD_VER >= 14 [ 0:07] 570 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 571 forward_iterator(ia + sa), [ 0:07] 572 forward_iterator(ib), [ 0:07] 573 forward_iterator(ib + sa)) == true); [ 0:07] 574 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 575 forward_iterator(ia + sa), [ 0:07] 576 forward_iterator(ib + 1), [ 0:07] 577 forward_iterator(ib + sa)) == false); [ 0:07] 578 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 579 forward_iterator(ia + sa), [ 0:07] 580 forward_iterator(ib), [ 0:07] 581 forward_iterator(ib + sa - 1)) == false); [ 0:07] 582 #endif [ 0:07] 583 } [ 0:07] 584 { [ 0:07] 585 const int ia[] = {0, 1, 2, 3, 0, 5, 6, 2, 4, 4}; [ 0:07] 586 const int ib[] = {4, 2, 3, 0, 1, 4, 0, 5, 6, 2}; [ 0:07] 587 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 588 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 589 forward_iterator(ia + sa), [ 0:07] 590 forward_iterator(ib)) == true); [ 0:07] 591 #if TEST_STD_VER >= 14 [ 0:07] 592 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 593 forward_iterator(ia + sa), [ 0:07] 594 forward_iterator(ib), [ 0:07] 595 forward_iterator(ib + sa)) == true); [ 0:07] 596 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 597 forward_iterator(ia + sa), [ 0:07] 598 forward_iterator(ib + 1 ), [ 0:07] 599 forward_iterator(ib + sa)) == false); [ 0:07] 600 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 601 forward_iterator(ia + sa), [ 0:07] 602 forward_iterator(ib), [ 0:07] 603 forward_iterator(ib + sa - 1)) == false); [ 0:07] 604 #endif [ 0:07] 605 } [ 0:07] 606 { [ 0:07] 607 const int ia[] = {0, 1, 2, 3, 0, 5, 6, 2, 4, 4}; [ 0:07] 608 const int ib[] = {4, 2, 3, 0, 1, 4, 0, 5, 6, 0}; [ 0:07] 609 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:07] 610 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 611 forward_iterator(ia + sa), [ 0:07] 612 forward_iterator(ib)) == false); [ 0:07] 613 #if TEST_STD_VER >= 14 [ 0:07] 614 assert(std::is_permutation(forward_iterator(ia), [ 0:07] 615 forward_iterator(ia + sa), [ 0:07] 616 forward_iterator(ib), [ 0:07] 617 forward_iterator(ib + sa)) == false); [ 0:07] 618 #endif [ 0:07] 619 } [ 0:07] 620 [ 0:07] 621 #if TEST_STD_VER > 17 [ 0:07] 622 static_assert(test_constexpr()); [ 0:07] 623 #endif [ 0:07] 624 [ 0:07] 625 return 0; [ 0:07] 626 } [ 0:07] # no errors were expected but one was found anyway