warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)

Hi,
Here's the other warning I receive when I compile the source code.
//------------------------
warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
//------------------------

The line incriminated is between two lines like this: //-------------------------------------------------------------------------

Here's all the code
//*************************** BEGINNING OF THE CODE
#ifndef cUnknownPtr_DEFINED
#define cUnknownPtr_DEFINED

template <typename T>
class cUnknownPtr
{
  T* ptr;
public:
  cUnknownPtr() : ptr(0)
  {
  }

  cUnknownPtr(T* p) : ptr(p)
  {
  }

  cUnknownPtr(const cUnknownPtr<T>& other) : ptr(other.ptr)
  {
    if(ptr)
    {
      ptr->AddRef();
    }
  }

  ~cUnknownPtr()
  {
    setNull();
  }

  cUnknownPtr<T>& operator = (const cUnknownPtr<T>& other) //treat as pointer
  {
    if(other.ptr != ptr)
    {
      if(ptr)ptr->Release();
      ptr = other.ptr;
      if(ptr)ptr->AddRef();
    }
    return *this;
  }

  T* operator -> () //treat as pointer
  {
    return ptr;
  }

  operator T* () //silent cast operator
  {
    return ptr;
  }

  T** operator & () //address of operator
  {
    return &ptr;
  }

  bool isValid()
  {
    return ptr != 0;
  }

  bool isNull()
  {
    return ptr == 0;
  }

  void setNull()
  {
    if(ptr)
    {
      ptr->Release();
      ptr = 0;
    }
  }

  bool QI(REFIID riid,void** ppObj)
  {
    if(isNull())return false;
    return SUCCEEDED(ptr->QueryInterface(riid,ppObj));
  }

//----------------------------------------------------------------------
void demandQI(REFIID riid,void** ppObj) throw(HRESULT)
//----------------------------------------------------------------------
  {
    if(isNull())throw E_FAIL;
    HRESULT hr = ptr->QueryInterface(riid,ppObj);
    if(FAILED(hr))
    {
      throw hr;
    }
  }
};

inline void checkResult(HRESULT r)
{
  if (FAILED(r))
    throw r;
}

#endif//cUnknownPtr_DEFINED
//*************************** END OF THE CODE

THANKS YOU FOR ANY ADVICE...
racinecondeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AlexFMCommented:
C++ compiler allows this feature for future use, but doesn't implement it. throw(HRESULT) part is not implemented currently, as described in the C4290 MSDN topic. To turn off this warning add:

#pragma warning( disable : 4290 )

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
racinecondeAuthor Commented:
I'm very impressed Alex... very impressed...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual C++.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.