[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C++ namespace question
From: |
Rik |
Subject: |
C++ namespace question |
Date: |
Fri, 16 Jun 2017 09:38:07 -0700 |
I need a little C++ help. I'm deprecating is_NA in favor of isna within
the octave::math namespace. The modified code in lo-mappers.h is
namespace octave
{
namespace math
{
extern OCTAVE_API bool isna (double x);
OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
inline bool is_NA (double x) { return isna (x); }
extern OCTAVE_API bool isna (float x);
OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
inline bool is_NA (float x) { return octave::math::isna (x); }
In one case, I wrote the inline substitute function without using the
namespace prefix, in the other I kept the prefix. The code compiles fine,
but which is preferred?
--Rik
- C++ namespace question,
Rik <=