blob: 98e773b680a940c55188272b96947912b07ee4c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* Copyright 2002 - 2016, The libsigc++ Development Team
* Assigned to public domain. Use as you wish without restriction.
*/
#include "testutilities.h"
#include <sigc++/sigc++.h>
namespace {
constexpr
int foo(int a, int b) {
return a + b;
}
} // end anonymous namespace
int
main()
{
constexpr auto slot = sigc::ptr_fun(&foo);
constexpr auto result = slot(1, 2);
if (result != 3) {
return EXIT_FAILURE;
}
EXIT_SUCCESS;
}
|