Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Index constructor from Vector now explicit
Re: Index constructor from Vector now explicit [message #39210 is a reply to message #39196] Thu, 28 February 2013 12:42 Go to previous messageGo to previous message
mdelfede is currently offline  mdelfede
Messages: 1310
Registered: September 2007
Ultimate Contributor
mirek wrote on Tue, 26 February 2013 20:02

Today I have encountered pretty tricky issue:

VectorMap<String, String> h;
const Index<String>& x = h.GetKeys();

This innocent looking code is broken in a very tricky way: GetKeys returns a reference to Vector<String> which is then picked by Index constructor to perform a conversion to Index<String> (in reality, there should have been h.GetIndex() instead...).

Because I have spent some bad amount of time trying to figure out what is happening........
Mirek


Eh... I stumbled on this error some time ago, and it took me a whole day to figure it out Smile
Good idea to fix it Smile
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: HttpRequest added remaining HTTP methods
Next Topic: .ini file parser refactored
Goto Forum:
  


Current Time: Sat Sep 06 01:17:08 CEST 2025

Total time taken to generate the page: 0.05794 seconds