In mem_fn.hpp (not sure what is doing this but my bet is bind or
function) there is a function dm::call<U> that looks like so:
template<class U> R const & call(U & u, void const *) const
{
return (get_pointer(u)->*f_);
}
The stupid compiler (MSVC++ 8.0) complained that u is an unreferenced
formal parameter and then crashed. So I told it to stop giving me that
warning in the file that is causing the issue and the problem went
away...until I set about trying use the function that I just wrote that
caused it. Now I get this:
1>d:\boostvs39\include\boost\bind\mem_fn.hpp(334) : error C4716:
'boost::_mfi::dm::call' : must return a value
I can't recreate this in a simple program. Here's the code of the
function that I just wrote when this BS started happening:
void on_change(wxGridEvent & event)
{
using namespace esi::units::systems::SI;
using namespace esi::pipeflo::document;
if (event.GetCol() == 0) return;
std::pair< boost::function< std::vector< std::string >() >
, boost::function< void(size_t) > > functions[] =
{
std::make_pair( boost::bind(&unit_settings::get_labels<pressure>,
&units)
, boost::bind(&unit_settings::set_selection
<pressure>, &units) )
, std::make_pair( boost::bind(&unit_settings::get_labels<length>,
&units)
, boost::bind(&unit_settings::set_selection<length>,
&units) )
, std::make_pair( boost::bind(&unit_settings::get_labels,
&units)
, boost::bind(&unit_settings::set_selection
, &units) )
, std::make_pair( boost::bind(&unit_settings::get_labels
, &units)
, boost::bind(&unit_settings::set_selection
, &units) )
, std::make_pair( boost::bind(&unit_settings::get_labels
, &units)
, boost::bind(&unit_settings::set_selection
, &units) )
};
std::vector< std::string > labels = functions[event.GetRow()].first
();
std::vector< std::string >::iterator fit = std::find(labels.begin(),
labels.end(), grid->GetCellValue(event.GetRow(), event.GetCol()));
assert(fit != labels.end() && "Somehow the user selected a unit that
doesn't exist.");
if (fit != labels.end())
{
functions[event.GetRow()].second(std::distance(labels.begin(),
fit));
}
}
The namespace esi::units::systems::SI has a "using boost::units::si" in
it.
I am not really expecting anyone can help me but I thought I'd try
anyway. Surely other people have been stabbed in the face by this
terribly buggy compiler.