Re: [Interest] Qt 5.5.0 Compile Time Hash Example

2015-08-24 Thread m...@rpzdesign.com
That is exactly what the doctor ordered. I spent a lot of time searching via google and the best that I came up with was what I shared for discussion. Thanks for the ISOCPP.org reference, I am sure more of us will be looking at it as well. Have a great day, md On 8/24/2015 9:32 AM, Thiago Mac

Re: [Interest] Qt 5.5.0 Compile Time Hash Example

2015-08-24 Thread Thiago Macieira
On Monday 24 August 2015 06:16:55 m...@rpzdesign.com wrote: > Would you be interested in sharing your solution > to the switch(STRING) problem? It's been posted several times to the C++ discussion lists: string_switch(string, do_case(value1, [] { do1(); }),

Re: [Interest] Qt 5.5.0 Compile Time Hash Example

2015-08-24 Thread m...@rpzdesign.com
Andre & Helmut: Thank you for your comments. Would you be interested in sharing your solution to the switch(STRING) problem? md On 8/24/2015 6:11 AM, André Somers wrote: > Op 24-8-2015 om 14:07 schreef m...@rpzdesign.com: >> Helmut: >> >> Yes, but you are talking about a different use case >>

Re: [Interest] Qt 5.5.0 Compile Time Hash Example

2015-08-24 Thread André Somers
Op 24-8-2015 om 14:07 schreef m...@rpzdesign.com: > Helmut: > > Yes, but you are talking about a different use case > with algorithmic purity. > > We do not care about every string. > > We only care about the strings in our program. > > For quality assurance, you can scan the source code looking fo

Re: [Interest] Qt 5.5.0 Compile Time Hash Example

2015-08-24 Thread m...@rpzdesign.com
Helmut: Yes, but you are talking about a different use case with algorithmic purity. We do not care about every string. We only care about the strings in our program. For quality assurance, you can scan the source code looking for every instance of the fnhash("STRING") and make sure there are

Re: [Interest] Qt 5.5.0 Compile Time Hash Example

2015-08-23 Thread Helmut Mülner
This will not work in every case because you cannot guarantee that your hash function generates a unique value for every string. In hash based containers you still have to compare against the valueof the string. Am 24.08.2015 01:27 schrieb "mark diener" : > Hello List: > > Have you ever wanted an

[Interest] Qt 5.5.0 Compile Time Hash Example

2015-08-23 Thread mark diener
Hello List: Have you ever wanted an efficient switch statement on QString values? There are many references to the subject with various algorithms, but they all have some major flaw in the implementation. For those looking for a way to have compile and run time hash on their strings, I spent a l