$ git clone https://github.com/codesome/go-channel-in-cpp.git
$ cd go-channel-in-cpp/
$ vi test.cpp
// now uncomment the test section that you want
$ make test
Channel<int> my_chan;
my_chan.add(30);
bool is_closed;
int data = my_chan.retrieve(&is_closed);
if(!is_closed) {
cout << "Data retrieved is " << data << endl;
} else {
cout << "Channel is closed, so data retrieved is junk value" << endl;
}