static_cast and std::vector1223 (1/20/2012 1:56:15 PM) comp.lang.c++ Hi, I am attempting to replace lots of C-style casts with static_cast's in our code base. Most of these are simple, but there are a few that I'm not sure what to do. Basically, the problem is shown in the ... john
would you consider this function const?1221 (12/14/2011 3:17:23 PM) comp.lang.c++ Are the following functions an abuse of good usage of 'const'? I think func3 is an abuse, but I'm not sure if func1 or func2, in isolation, would be considered poor usage since they do not actually modify an... john
intent(out)236 (4/19/2011 5:22:42 PM) comp.lang.fortran Say I have the following !========= type A integer, pointer :: x(:) => null() integer :: y = 0 end type A !========= type B integer, pointer :: x(:) integer :: y end type B !========= subroutin... john
template question #19237 (4/15/2011 4:40:18 PM) comp.lang.c++ Hi, I have a templated class whose template parameter depends on a library. For most platforms, the library defines a certain type as an integer, so my original class was //library code typedef ... John
scalapack (pdgemr2d) question172 (1/13/2011 2:51:20 PM) comp.lang.fortran Hi, This is not a direct Fortran question, but I know a number of people on this newsgroup have experience with scalapack. If there is a better newsgroup to post this to, please let me know. I'm trying to ... John
Over-riding static functions/data422 (11/4/2009 12:17:53 PM) comp.lang.c++ Is it permissible to over-ride a static function or member data in a class? The code below works as I would expect and compiles without error, but I am wondering if it is standard or if it is discouraged pr... John
DBL_MAX #2424 (11/2/2009 12:19:08 PM) comp.lang.c++ Hi, I know that to get the maximum floating point value we can use DBL_MAX. To get the maximum negative value is it permissible (and portable) to use (-DBL_MAX). If it is not, how does one get the maximum... John
Is a class a friend of itself?1018 (8/11/2009 2:36:09 PM) comp.lang.c++ Hi, In the code below, if I define member functions that take an A object, then I am able to change protected data members of the passed in A object. Does this mean that all members functions of a class or ... John
Derived classes from templates238 (8/10/2009 1:17:50 PM) comp.lang.c++ Hi, I'm having trouble with the code posted below. When I derive my R3 class from X3, I do not seem to be able to access any of the public functions defined at the X3 level from an object of type R3. When... John
Template specialization #16620 (7/24/2009 1:38:36 PM) comp.lang.c++ Hi, Suppose I have a template clasee template A { //data .... T a; //functions .... func1(T b); func2(T b); func3(T b); }; In one particular case, say int, func3 is different, so I want ... John
Derived classes from templates238 (8/10/2009 1:17:50 PM) comp.lang.c++ Hi, I'm having trouble with the code posted below. When I derive my R3 class from X3, I do not seem to be able to access any of the public functions defined at the X3 level from an object of type R3. When... gh14tq5(118)
Is a class a friend of itself?1018 (8/11/2009 2:36:09 PM) comp.lang.c++ Hi, In the code below, if I define member functions that take an A object, then I am able to change protected data members of the passed in A object. Does this mean that all members functions of a class or ... gh14tq5(118)
DBL_MAX #2424 (11/2/2009 12:19:08 PM) comp.lang.c++ Hi, I know that to get the maximum floating point value we can use DBL_MAX. To get the maximum negative value is it permissible (and portable) to use (-DBL_MAX). If it is not, how does one get the maximum... gh14tq5(118)
Over-riding static functions/data422 (11/4/2009 12:17:53 PM) comp.lang.c++ Is it permissible to over-ride a static function or member data in a class? The code below works as I would expect and compiles without error, but I am wondering if it is standard or if it is discouraged pr... gh14tq5(118)
Poor performance with OpenMP54111 (1/13/2011 1:13:04 PM) comp.lang.fortran Hello, Ok. I've managed to learn just enough to write my first real OpenMP program. It performs a matrix multiplication. I can clearly see it taking both my CPU cores to 100% when it runs, but strangely, it ta... dcarrera(192)
scalapack (pdgemr2d) question172 (1/13/2011 2:51:20 PM) comp.lang.fortran Hi, This is not a direct Fortran question, but I know a number of people on this newsgroup have experience with scalapack. If there is a better newsgroup to post this to, please let me know. I'm trying to ... gh14tq5(118)
template question #19237 (4/15/2011 4:40:18 PM) comp.lang.c++ Hi, I have a templated class whose template parameter depends on a library. For most platforms, the library defines a certain type as an integer, so my original class was //library code typedef ... gh14tq5(118)
intent(out)236 (4/19/2011 5:22:42 PM) comp.lang.fortran Say I have the following !========= type A integer, pointer :: x(:) => null() integer :: y = 0 end type A !========= type B integer, pointer :: x(:) integer :: y end type B !========= subroutin... gh14tq5(118)
would you consider this function const?1221 (12/14/2011 3:17:23 PM) comp.lang.c++ Are the following functions an abuse of good usage of 'const'? I think func3 is an abuse, but I'm not sure if func1 or func2, in isolation, would be considered poor usage since they do not actually modify an... gh14tq5(118)
static_cast and std::vector1223 (1/20/2012 1:56:15 PM) comp.lang.c++ Hi, I am attempting to replace lots of C-style casts with static_cast's in our code base. Most of these are simple, but there are a few that I'm not sure what to do. Basically, the problem is shown in the ... gh14tq5(118)