This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: TR1 math code
- From: 3dw4rd at verizon dot net
- To: drepper at gmail dot com, libstdc++ at gcc dot gnu dot org, 3dw4rd at verizon dot net
- Date: Sun, 03 Mar 2013 14:54:23 -0600 (CST)
- Subject: Re: TR1 math code
On 03/02/13, Ulrich Drepper<drepper@gmail.com> wrote:
Some of the code which is currently in <tr1/*> will be useful in some new standard or <ext/*> code. How shall we proceed using that code?
For instance, we'll need the hypergeometric functions. Should including, say, <ext/random> make available <tr1/cmath>? Or should we structure the code in <tr1/*> so that we can include it in <ext/*> headers without introducing the tr1 namespace? For instance, remove the namespace definitions in the various *.tcc files and wrap the #includes in <tr1/cmath> with an appropriate namespace definition. This way we could include the files in two different places.
Any opinions?
One thing to keep in mind is that http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3060.pdf add most of the TR1 special math functions to the std:: namespace. I was going to start this for 4.9 after cleaning up tr1 math a bit. (incidentally, the hypergeometric functions did *not* make it in because they were viewed as too unstable and difficult for good QoI. So we'll still have to do something with them. They may make into std math anyway). so you'll just (eventually) call std math functions.
This still begs the question of how we do n3060. I had envisioned moving the math *.tcc to bits and having cmath and tr1/cmath call those __detail namespace functions. n3060 has a preprocessor define so you could opt in or opt out of having the math functions.
Unfortunately, my motherboard bricked so I'm getting back on my feet with this stuff. Hopefully I can get the cleanup done before branch.
Ed