#include <iostream>
#include <algorithm>
#include <vector>
#include <boost/array.hpp>
#include <boost/bind.hpp>
int main() {
boost::array<int, 4> a = {45, 11, 67, 23};
std::vector<int> v(a.begin(), a.end());
std::vector<int> v2;
std::transform(v.begin(), v.end(), v2.begin(),
boost::bind(std::multiplies<int>(), _1, 2));
std::copy(v2.begin(), v2.end(), std::ostream_iterator<int>(std::cout, " "));
}
When run, this gives a creepy segmentation fault. Please tell me where I'm going wrong.