Currency and operator<

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Currency and operator<

andrea-110
Hi,

I was wondering if there is a special reason why Currency does not have operator<
so that it cannot be the key of a map.

Before adding it myself I wanted to check if I am doing something bad.

something like

map<Currency, Handle<YieldCurve> >

Andrea


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Currency and operator<

Luigi Ballabio
On Sat, 2010-10-30 at 14:16 +0100, Andrea wrote:
> I was wondering if there is a special reason why Currency does not have operator<
> so that it cannot be the key of a map.

I wouldn't add an operator< just for that (because ordering currencies
doesn't make much sense) but of course you can add it if you need it.

Luigi


--

When all else fails, pour a pint of Guinness in the gas tank,
advance the spark 20 degrees, cry "God Save the Queen!", and pull
the starter knob.
-- MG "Series MGA" Workshop Manual



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev