U++ framework
Do not panic. Ask here before giving up.

Home » Community » Newbie corner » Compile time hash macro
Compile time hash macro [message #56341] Tue, 23 February 2021 17:55 Go to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
Hello U++ !

Is there a way in U++ to do hashing of String during compilation ?

#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	Cout() << GetHashValue ("Hello") << EOL; //Runtime hashing
	Cout() << HASH64("Hello") << EOL; //Compile time hashing
	//Both value printed should be identique
}
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: error: call to implicitly-deleted copy constructor
Next Topic: deprecated function encountered
Goto Forum:
  


Current Time: Sun Nov 15 21:37:41 GMT+1 2026

Total time taken to generate the page: 0.00646 seconds