It seems like certain C++ compilers require us to import the <functional> library in accessibility.cpp.
Not including it leads to errors like this:
src/accessibility.cpp:352:10: error: 'function' is not a member of 'std'
std::function<double(const double &, const float &, const float &)> sum_function;
^~~~~~~~
The conda-forge Windows 2.7 build is currently blocked with a similar looking error, so I'm hoping that fixing this in the source code will allow it to work. (More info about that in this un-merged PR: https://github.com/conda-forge/pandana-feedstock/pull/3.)
Plan
I think we should probably merge this directly into master and release it as v0.4.3. Adding the import statement does not affect compilation on platforms where it was already working -- at least not on my Mac or on the Travis Ubuntu images.
Coverage remained the same at 91.667% when pulling 3cace5ca3ff12e251be0d6dfb5a5fb78d9df1931 on include-functional into 946da88bf4c1d2df8c7093167c5d56c3d4a52324 on master.
Coverage remained the same at 91.667% when pulling 125eebdcad39f16e6157b9500efe1fa1578e6478 on include-functional into 946da88bf4c1d2df8c7093167c5d56c3d4a52324 on master.
It seems like certain C++ compilers require us to import the
<functional>
library inaccessibility.cpp
.Not including it leads to errors like this:
This came up in one of the conda-forge Linux builds and is currently fixed with a patch in the build recipe: https://github.com/conda-forge/pandana-feedstock/pull/1/commits/fa91ad4fe6ed30febbb28bb6fb011d24d7e776c7
The conda-forge Windows 2.7 build is currently blocked with a similar looking error, so I'm hoping that fixing this in the source code will allow it to work. (More info about that in this un-merged PR: https://github.com/conda-forge/pandana-feedstock/pull/3.)
Plan
I think we should probably merge this directly into
master
and release it as v0.4.3. Adding the import statement does not affect compilation on platforms where it was already working -- at least not on my Mac or on the Travis Ubuntu images.