Language
C++
Compiler
clang 15.0.7
Options
Warnings
Boost 1.80.0
C++2b(GNU)
no pedantic
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.80.0-clang-15.0.7/include -std=gnu++2b
struct MyPair
{
double a,b;
double multiply() {return a*b;}
} ten_two {10,2};
bind (divides<int>{},10,2)() = 5
bind (divides<int>{},placeholders::_1,2)(10) = 5
bind (divides<int>{},placeholders::_2,placeholders::_1)(10,2) = 0
bind<int> (divides<int>{},placeholders::_1,placeholders::_2)(10,3) = 3
bind (&MyPair::multiply,placeholders::_1)(ten_two) = 20
bind (&MyPair::a,ten_two)() = 10
Exit Code:
0