[ create a new paste ] login | about

Link: http://codepad.org/VcMDleOM    [ raw code | output | fork ]

DigitalGhost - C++, pasted on Jan 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
#include <functional>

struct int_adder {
    typedef int first_argument_type;
    typedef int second_argument_type;
    typedef int result_type;
    int operator()(int a, int b) const { return a + b; }
};

int main() {
    std::cout << bind2nd(int_adder(), 3)(5) << '\n';
}


Output:
1
8


Create a new paste based on this one


Comments: