More of the "no constructor from iterators for vectors" workaround.

This commit is contained in:
Marc Glisse 2007-08-27 10:09:41 +00:00
parent 607a984732
commit df8c51f577
2 changed files with 5 additions and 5 deletions

View File

@ -37,19 +37,19 @@ int main() {
std::cout << "There are " << p.number_of_monomers() << " residues." std::cout << "There are " << p.number_of_monomers() << " residues."
<< std::endl; << std::endl;
std::vector<Atom> atoms(make_atom_iterator(p.atoms_begin()), std::vector<Atom> atoms CGAL_make_vector(make_atom_iterator(p.atoms_begin()),
make_atom_iterator(p.atoms_end())); make_atom_iterator(p.atoms_end()));
CGAL_assertion(na==atoms.size()); CGAL_assertion(na==atoms.size());
std::vector<Point> points(make_point_iterator(make_atom_iterator(p.atoms_begin())), std::vector<Point> points CGAL_make_vector(make_point_iterator(make_atom_iterator(p.atoms_begin())),
make_point_iterator(make_atom_iterator(p.atoms_end()))); make_point_iterator(make_atom_iterator(p.atoms_end())));
index_atoms(make_backbone_iterator(p.atoms_begin(), p.atoms_end()), index_atoms(make_backbone_iterator(p.atoms_begin(), p.atoms_end()),
make_backbone_iterator(p.atoms_end(), p.atoms_end())); make_backbone_iterator(p.atoms_end(), p.atoms_end()));
std::vector<Index> bbi(make_index_iterator(make_atom_iterator(make_backbone_iterator(p.atoms_begin(), p.atoms_end()))), std::vector<Index> bbi CGAL_make_vector(make_index_iterator(make_atom_iterator(make_backbone_iterator(p.atoms_begin(), p.atoms_end()))),
make_index_iterator(make_atom_iterator(make_backbone_iterator(p.atoms_end(), p.atoms_end())))); make_index_iterator(make_atom_iterator(make_backbone_iterator(p.atoms_end(), p.atoms_end()))));
CGAL_assertion(bbi.size() < atoms.size()); CGAL_assertion(bbi.size() < atoms.size());
std::cout << bbi.size() << std::endl; std::cout << bbi.size() << std::endl;
std::vector<Bond> bbs(make_bond_indices_iterator(make_ok_bond_iterator(Is_backbone(), p.bonds_begin(), p.bonds_end())), std::vector<Bond> bbs CGAL_make_vector(make_bond_indices_iterator(make_ok_bond_iterator(Is_backbone(), p.bonds_begin(), p.bonds_end())),
make_bond_indices_iterator(make_ok_bond_iterator(Is_backbone(), p.bonds_end(), p.bonds_end()))); make_bond_indices_iterator(make_ok_bond_iterator(Is_backbone(), p.bonds_end(), p.bonds_end())));
std::cout << bbs.size() << std::endl; std::cout << bbs.size() << std::endl;
for (unsigned int i=0; i< bbs.size(); ++i) { for (unsigned int i=0; i< bbs.size(); ++i) {

View File

@ -49,7 +49,7 @@ private :
default : default :
Tokenizer tk(line,Separator(" ")); Tokenizer tk(line,Separator(" "));
vector<string> tokens(tk.begin(),tk.end()); vector<string> tokens CGAL_make_vector(tk.begin(),tk.end());
CHECK_MSG( tokens.size() >= 1, str(format("Invalid audit line of type I, id field missing: %1%") % line) ) ; CHECK_MSG( tokens.size() >= 1, str(format("Invalid audit line of type I, id field missing: %1%") % line) ) ;
CHECK_MSG( tokens.size() >= 2, str(format("Invalid audit line of type I, cost field missing: %1%") % line) ) ; CHECK_MSG( tokens.size() >= 2, str(format("Invalid audit line of type I, cost field missing: %1%") % line) ) ;