String operator<< int64 request

Discussion and support for general JUCE issues

String operator<< int64 request

Postby dave96 » Thu Jul 05, 2012 4:23 pm

Hi Jules, would it be possible to add operator<<'s for the int64 variable type? At the moment these have to be explicitly casted to another variable type such as an int or double to get the operator's to work. Or of course wrap them in a String constructor. Its just a bit of a pain when your using lots of DBG macros when debugging and String does provide an int64 constructor.

Thanks.
dave96
JUCE UberWeenie
 
Posts: 452
Joined: Sat Dec 27, 2008 9:29 pm

Re: String operator<< int64 request

Postby TheVinn » Thu Jul 05, 2012 4:47 pm

If there were two conversions from int, wouldn't that make a lot of calls ambiguous?
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2975
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: String operator<< int64 request

Postby jules » Thu Jul 05, 2012 7:54 pm

Yeah, I think that'd be ok. The String constructors are overridden with int and int64, and that doesn't seem to create any ambiguity problems, so this is probably fine too.
User avatar
jules
Fearless Leader
 
Posts: 17193
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: String operator<< int64 request

Postby dave96 » Wed Jul 18, 2012 10:45 pm

Hi Jules, I know you added this operator to OutputStream but that still doesn't help with the DBG macro, I still have to wrap the variable in a String constructor. Can you please add this operator to the String class. Thanks.
dave96
JUCE UberWeenie
 
Posts: 452
Joined: Sat Dec 27, 2008 9:29 pm

Re: String operator<< int64 request

Postby jules » Thu Jul 19, 2012 8:36 am

Yes, will do!
User avatar
jules
Fearless Leader
 
Posts: 17193
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK


Return to General JUCE discussion

Who is online

Users browsing this forum: No registered users and 1 guest