I guess in your type-erased iterator that won't work because, well, it depends on the type that you're erasing :)
a->b may be transformed into a.operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->().operator->()->b
@RMartinhoFernandes yeah, since I couldn't return the underlying iterator, I went with microsoft's implementation of hoping &*iter is a pointer. Either way, it doesn't return itself, so no recursion.
@RMartinhoFernandes And I carefully designed it so iterators can be nested if the user really wants to, but I can't think of a use-case.
@MooingDuck But is iterator_traits<iterator>::reference required to actually be a reference? That would forbid things like boost's counting iterator, no?
@RMartinhoFernandes if I make template specializations for operator-> then that solves all these problems. return iter.operator->() for everything, except return iter for pointers.
@DeadMG I want so badly to point out a case where you're wrong, but the only placed I've ever used it was when making a wrapper for a poorly designed API. :(
which thankfully is a much rarer problem than people who use virtual methods in general, because they think C++ is just a more annoying version of Java
wait... my code just fired an assert in a release build. I fixed the problem, but... shouldn't asserts be disabled in release? That'd explain why my code is so much slower than std::map then...
When preceded by the appropriate ln -s incantations, I believe that path can indeed be made to work. Although one likely hasn't permission to do so on ideone.
@DeadMG: Since I've read the design before, and you don't care to, I promise that there are a TON of ideas in there that are applicable to writing a fast associative array in C++.
@DeadMG Things you pointed out like this, already accounted for and optimized
@DeadMG i thought tries were about compressing search trees. i don't think storing (smart) pointers in there would really be a prime area of application? Haven't looked at the link yet, though
is there a way to hook onto the system so that whatever app your in the process will stay true?
so like if i write fome objective c for mac, how would i make it so that if i click on a diffrent app, the in app effects would apply to that app, or hook the code to that app being open, it could just be the code aplying to one app
I've been working on a new OS and was wondering where to start with user-mode libraries (as in standard APIs for user-mode applications). I've finished most of the kernel-mode logic, and can get the computer to boot into a basic BASH-style interface, and have also created a basic filesystem.
Even if I did make it hiv instead of std; it would still be simple to write a script to replace all instances of std with hiv. Today's IDEs are pretty powerful
I think a better idea for your OS would be for it to automatically rickroll anyone who causes a segfault, and to play the Friday song whenever anyone divides by zero.
To concatenate means to string together different things. Concatenating "snow" and "ball" produces "snowball." But what would the opposite action be? What is the name of the action used to derive two words from one?
(My dictionaries don't list any antonyms, and Googling revealed how to do the op...
In the general case, concatenation loses information (where the separations lie) and that information cannot be perfectly recovered in the absence of additional information.
Hey :) I'm reading this text file into a buffer and while there is no vertical tab (ascii 13) everything works great , but when there is a vertical tab in the file , for some reason , getline inserts a '0' into my character buffer , any idea why that is ? or what that '0' is for ?
Laura Dekker (born 20 September 1995) is a Dutch sailor. In 2009, she announced her plan to become the youngest person to circumnavigate the globe single-handed. A Dutch court stepped in, due to the objections of the local authorities, and prevented Dekker from departing while under shared custody of both her parents. In July 2010, a Dutch family court ended this custody arrangement, and the record breaking attempt finally began on 21 August 2010.
Family
Dekker was born in the city of Whangarei, New Zealand during a seven-year trip by her parents. Her father, Dick Dekker, is Dutch and he...
Starting to gain respect for this person.
I thought the whole attempt was silly, but she's actually pulling it off.
Thursday October Christian (14 October 1790 – 21 April 1831) was the first son of Fletcher Christian (leader of the historical mutiny on the Bounty) and his Tahitian wife Mauatua. He was conceived on Tahiti, and was the first child born on the Pitcairn Islands after the mutineers took refuge on the island. Born on a Thursday in October, he was given his unusual name because Fletcher Christian wanted his son to have "no name that will remind me of England."
Thursday married into his parents' generation. At age 16 he married Teraura (Susannah), who had been Ned Young’s original , and was p...