#include <iostream>
#include "bm.h"
#include "bmundef.h"
using namespace std;
template<class T> void PrintContainer(T first, T last)
{
if (first == last)
cout << "<EMPTY SET>";
else
for(;first != last; ++first)
cout << *first << ", ";
cout << endl;
}
int main(void)
{
try
{
bm::bvector<> bv { 1, 10, 100 };
cout << "Source set:";
PrintContainer(bv.first(), bv.end());
bv.shift_right();
PrintContainer(bv.first(), bv.end());
bv.insert(0, false);
PrintContainer(bv.first(), bv.end());
bv.insert(4, true);
PrintContainer(bv.first(), bv.end());
}
catch(std::exception& ex)
{
std::cerr << ex.what() << std::endl;
return 1;
}
return 0;
}