Preprocessor: refactor usage of GNU g++ specific features
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2840 ac1d8469-bf42-47a9-8791-bf33cf982152issue#70
parent
daae864666
commit
165ede20b4
|
@ -21,7 +21,11 @@
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <ext/functional>
|
// For select1st()
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# include <ext/functional>
|
||||||
|
using namespace __gnu_cxx;
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
@ -103,7 +107,7 @@ ExprNode::collectModelLocalVariables(set<int> &result) const
|
||||||
set<pair<int, int> > symb_ids;
|
set<pair<int, int> > symb_ids;
|
||||||
collectVariables(eModelLocalVariable, symb_ids);
|
collectVariables(eModelLocalVariable, symb_ids);
|
||||||
transform(symb_ids.begin(), symb_ids.end(), inserter(result, result.begin()),
|
transform(symb_ids.begin(), symb_ids.end(), inserter(result, result.begin()),
|
||||||
__gnu_cxx::select1st<pair<int, int> >());
|
select1st<pair<int, int> >());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -26,7 +26,11 @@
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
// For select2nd()
|
||||||
|
# ifdef __GNUC__
|
||||||
# include <ext/functional>
|
# include <ext/functional>
|
||||||
|
using namespace __gnu_cxx;
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/graph/adjacency_list.hpp>
|
#include <boost/graph/adjacency_list.hpp>
|
||||||
|
@ -320,7 +324,7 @@ StaticModel::computeNormalization()
|
||||||
n1++;
|
n1++;
|
||||||
|
|
||||||
pair<multimap<int, int>::const_iterator, multimap<int, int>::const_iterator> x = natural_endo2eqs.equal_range(i);
|
pair<multimap<int, int>::const_iterator, multimap<int, int>::const_iterator> x = natural_endo2eqs.equal_range(i);
|
||||||
if (find_if(x.first, x.second, compose1(bind2nd(equal_to<int>(), endo2eq[i]), __gnu_cxx::select2nd<multimap<int, int>::value_type>())) == x.second)
|
if (find_if(x.first, x.second, compose1(bind2nd(equal_to<int>(), endo2eq[i]), select2nd<multimap<int, int>::value_type>())) == x.second)
|
||||||
cout << "Natural normalization of variable " << symbol_table.getName(symbol_table.getID(eEndogenous, i))
|
cout << "Natural normalization of variable " << symbol_table.getName(symbol_table.getID(eEndogenous, i))
|
||||||
<< " not used." << endl;
|
<< " not used." << endl;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue