MCPcopy Create free account
hub / github.com/davisking/dlib / swap

Function swap

dlib/test/invoke.cpp:31–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 struct some_other_struct {int i{0};};
30
31 void swap(some_other_struct& a, some_other_struct& b)
32 {
33 std::swap(a.i, b.i);
34 throw std::runtime_error("toy example");
35 }
36
37 static_assert(dlib::is_swappable<some_other_struct>::value, "oops");
38 static_assert(!dlib::is_nothrow_swappable<some_other_struct>::value, "oops");

Callers 15

stack_kernel_testFunction · 0.70
matrix_test1Function · 0.70
static_map_kernel_testFunction · 0.70
array2d_kernel_testFunction · 0.70
sequence_sort_testFunction · 0.70
run_testFunction · 0.70
reference_counter_testFunction · 0.70
hash_map_kernel_testFunction · 0.70
test_ldaMethod · 0.70
queue_sort_testFunction · 0.70
tuple_testFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected