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 » U++ Library support » U++ Core » Why there is no Index::Add(T&&)?
Re: Why there is no Index::Add(T&&)? [message #49099 is a reply to message #49094] Sun, 17 December 2017 22:09 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
busiek wrote on Sat, 16 December 2017 23:42
However, probably a single version of Add() method can be created using a solution with std::forward similarly as in Fixes to Array::Create & Vector::Create.

In order to make std::forward work method Add has to be a template method.
template<typename A>
A& Add(A&& x, unsigned _hash);

Using T&& with a method of a template class won't create a forwarding reference.


Regards,
Novo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GetCsvLine
Next Topic: The right container
Goto Forum:
  


Current Time: Sun May 05 21:29:42 CEST 2024

Total time taken to generate the page: 0.04399 seconds