File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed
Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change 2828#include " map"
2929#include " vector"
3030
31+ using namespace std ;
32+
3133struct Pt {int x; int y;};
3234struct InfoBlock {int IndImage; int Num; Pt BeginCoord; Pt Size;};
35+ /*
3336struct CmpInfoBlock :
34- public binary_function <const InfoBlock, const InfoBlock, bool > {
35- bool operator () (const InfoBlock& Key1, const InfoBlock& Key2) const {
36- return (Key1.Num < Key2.Num ? true : false );
37- }
38- };
37+ public binary_function <const InfoBlock, const InfoBlock, bool> {
38+ bool operator () (const InfoBlock& Key1, const InfoBlock& Key2) const {
39+ return (Key1.Num < Key2.Num ? true : false);
40+ }
41+ };
42+ */
43+ // binary_function is deprecated, and cannot be compiled anymore with clang-15.0
44+ // In https://reviews.llvm.org/D35455 (line 73), it is proposed to use instead the following lines:
45+ //
46+ struct CmpInfoBlock {
47+ typedef InfoBlock first_argument_type;
48+ typedef InfoBlock second_argument_type;
49+ typedef bool result_Type;
50+
51+ bool operator () (const InfoBlock& Key1, const InfoBlock& Key2) const {
52+ return (Key1.Num < Key2.Num ? true : false );
53+ }
54+ };
55+
56+
3957struct InfoTrans {InfoBlock Parent; vector<InfoBlock> Child;};
4058typedef map <InfoBlock,InfoTrans,CmpInfoBlock> MapInfo;
4159typedef map <int ,Ifloat*> MapTransf;
You can’t perform that action at this time.
0 commit comments