2 /* Copyright 2002, The libsigc++ Development Team
3 * Assigned to public domain. Use as you wish without restriction.
6 #include "testutilities.h"
7 #include <sigc++/sigc++.h>
11 // The correct result of this test may be implementation-dependent.
12 // No attempt is made to decide if the result is correct.
13 // The test will succeed, unless it's started with erroneous command arguments.
14 // "./test_size --verbose" shows the sizes.
22 } // end anonymous namespace
24 int main(int argc, char* argv[])
26 auto util = TestUtilities::get_instance();
28 if (!util->check_command_args(argc, argv))
29 return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;
31 if (util->get_verbose())
33 std::cout << "sizes of public classes:" << std::endl;
35 std::cout << " trackable: " << sizeof(sigc::trackable) << std::endl;
36 std::cout << " slot<void>: " << sizeof(sigc::slot<void>) << std::endl;
37 std::cout << " signal<void>: " << sizeof(sigc::signal<void>) << std::endl;
38 std::cout << " signal<void>::iterator: " << sizeof(sigc::signal<void>::iterator) << std::endl;
39 std::cout << " connection: " << sizeof(sigc::connection) << std::endl;
41 std::cout << std::endl << "sizes of internal classes:" << std::endl;
43 std::cout << " trackable_callback: " << sizeof(sigc::internal::trackable_callback) << std::endl;
44 std::cout << " trackable_callback_list: " << sizeof(sigc::internal::trackable_callback_list) << std::endl;
45 std::cout << " slot_rep: " << sizeof(sigc::internal::slot_rep) << std::endl;
46 std::cout << " typed_slot_rep<mem_functor0<void,A> >: "
47 << sizeof(sigc::internal::typed_slot_rep<sigc::mem_functor0<void,A> >) << std::endl;
48 std::cout << " signal_impl: " << sizeof(sigc::internal::signal_impl) << std::endl;
50 return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;