Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Templates and combinatorial maps

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Templates and combinatorial maps


Chronological Thread 
  • From: Guillaume Damiand <>
  • To: "" <>
  • Subject: Re: [cgal-discuss] Templates and combinatorial maps
  • Date: Thu, 13 Jun 2019 09:25:32 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:FCJjxxNbGacFov58Sg4l6mtUPXoX/o7sNwtQ0KIMzox0I//5rarrMEGX3/hxlliBBdydt6sdzbOL4+u5ADxIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfK5+IA+roQjRtcQajpZuJrsyxxDUvnZGZuNayH9yK1mOhRj8/MCw/JBi8yRUpf0s8tNLXLv5caolU7FWFSwqPG8p6sLlsxnDVhaP6WAHUmoKiBpIAhPK4w/8U5zsryb1rOt92C2dPc3rUbA5XCmp4ql3RBP0jioMKjg0+3zVhMNtlqJWuBKvqQFhzY7aY4+bOvRxcazfctwGXmdBUdpdWjZdD4+gYYYCD+wMNvtYoYnnoFsOqAOzCwixBOPuzj9IgmX53bA/0+s/DArI0hYvH9cPsHvOqtX6KboZXOe6zKnVzDXDa/dW1i3g6IjNbB8tu+yDUqh1ccrQ00YvER7Kg06UqYzkJTOV1/8Nv3KH4OpmT+KvkHQrqw9rojW2wMonl4fHhoUQyl/e9CV5xp44KsG+SE5het6oCpVQtzucOoBrQc0iW3lltDs0x7AJo5K3YjUGxZs9yxLCaPGKcJKE7g/sWeuQOTt0mm5pdK6iixu38EWty/HwW8y03VpWsiZJj9zBum0C2hDN78WKS/9w80m91juKyw/f9PxLLEIxmKbGN5Eu2KI8m58XvEvZBCD7m0P7h7KMeEo+4Oin8eHnb63mppCCM490jRnzPbgvmsykG+Q4KQ0OX3SD+eimyb3j+0z5QKtTgv0ykqjZt5baKdkBqq63GQ9Zyocj6xChADe6yNkUgHcKIV1fdB6ZkoTkNEvCLO37APq8mVigjThmyvHeMr3kGJrNL3zDkLn7fbZ67k5R0AUzzc1e55JQDrEOOu/zWkrvu9DCExA2KQm0w+f9B9V7y4wTQmaPAq6DMKPTql+E/P4gI++WZI8Oojr9JeIl6+b0jXAlgV8dYbWp3ZwPZX+kEfRpOUGZbWPxjdcACmcFohc+TPfxiFCZSj5SZ3OyX7om6T0hCYKmC53DRoG3j7Cb0ie7BM4eWmcTQFuDGHOte4SfUOoXcwqTJNVgm3oKT/LpH4Qu3BXruA7hwKd8NcLV/DcZvNTtzo4myffUkEQd6D1wC82A1mzFY2hxn2oOS3di071+pUh011KOl6Rxhv1RE9B74/JTUxx8PpjG1Kp0EYahCUr6Yt6VRQP+EZ2dCjYrQ4dpmoJcUwNGA9ynyyv78W+qDrsSzeDZD50v6LnZw2C3OsB81TPCxa4n1h8oWJkXbDz0tutE7wHWQrXxvQCcnqeue74b2XeQpmOC12uV+kpeShU2X7+XBClDNHuTlszw4wb5d5HrEa4ua1YTzc+YK7AMYdvzlhNIXqW7NQ==

Hi Yan;


Le 12/06/2019 à 11:31, Yan Garito a écrit :
Hello,

I'm having some trouble using combinatorial maps alongside templates. Here's the situation: I have a class A that contains a combinatorial map as an attribute and I want to template A by a number type, which is the information I want the edges of the combinatorial map to store. However, this results in compiler errors when trying to iterate over the attributes. Untemplating and hard coding the number type "fixes" the problem.
See the attached files for a minimum example of the problem. My compiler is g++, and my OS is Ubuntu 18. I did not tweak the Makefile generated with the CGAL scripts.


The errors comes from a "strange" C++ rule. When you call a template method in a template class, you need to use the keyword template.


In your minimal example, you should write:


           for (Edge_attrib_iterator
             it = cm.template attributes<1>().begin(),
             itend = cm.template attributes<1>().end(); it != itend; ++it)
           {
            std::cout<< cm.template info_of_attribute<1>(it) <<"; ";
           }


Best

Guillaume




Thank you in advance,
Yan Garito,
First year DIT student at ENS Rennes


-- 
===================================================================
Guillaume DAMIAND

CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.14.34                 Fax: +33 (0)4.72.43.15.36
Mail: 
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================

Attachment: smime.p7s
Description: Signature cryptographique S/MIME




Archive powered by MHonArc 2.6.18.

Top of Page