g++ -o single-slit single-slit.cpp single-slit.cpp: In function ‘double integral(boost::units::quantity >, boost::units::dimensionless_type>, boost::units::homogeneous_system > >, boost::units::list > > > > > > > > >, void>, double>, boost::units::quantity >, boost::units::dimensionless_type>, boost::units::homogeneous_system > >, boost::units::list > > > > > > > > >, void>, double>, boost::units::quantity >, boost::units::dimensionless_type>, boost::units::homogeneous_system > >, boost::units::list > > > > > > > > >, void>, double>, boost::units::quantity >, boost::units::dimensionless_type>, boost::units::homogeneous_system > >, boost::units::list > > > > > > > > >, void>, double>, double)’: single-slit.cpp:31: error: no match for ‘operator+=’ in ‘a += boost::units::operator/(const boost::units::quantity&, const boost::units::quantity&) [with Unit1 = boost::units::unit >, boost::units::dimensionless_type>, boost::units::homogeneous_system > >, boost::units::list > > > > > > > > >, void>, Unit2 = boost::units::unit >, boost::units::dimensionless_type>, boost::units::homogeneous_system > >, boost::units::list > > > > > > > > >, void>, X = std::complex, Y = double](((const boost::units::quantity >, boost::units::dimensionless_type>, boost::units::homogeneous_system > >, boost::units::list > > > > > > > > >, void>, double>&)((const boost::units::quantity >, boost::units::dimensionless_type>, boost::units::homogeneous_system > >, boost::units::list > > > > > > > > >, void>, double>*)(& r))))’ /usr/include/c++/4.4/complex:1220: note: candidates are: std::complex& std::complex::operator+=(double) make: *** [single-slit] Error 1