Apple Mac 操作系统 X*

Intel® C++ Compiler - Missing diagnostic on a static data member of a template with no initializer

In previous Intel® C++ Compiler, no diagnostic message is issued when a const static data member of a template class is defined but not initialized. Now the Intel® C++ Compiler 10.X, 11.0 for Linux* or Windows* or Mac OS* will issue a diagnostic message.

For example.
t.cpp:
template <class T> struct A {
    static const int i;
};
template <class T> const int A<T>::i;
template struct A<int>;

  • Linux*
  • Apple Mac 操作系统 X*
  • Microsoft Windows* (XP, Vista, 7)
  • C/C++
  • 英特尔® C++ 编译器
  • Performance Tools for Software Developers - printf() format descriptors of 64-bit objects

    Solution:

    There is no difference between descriptors for 64-bit objects and 32-bit objects. When displaying a 64-bit fixed-precision object ( INT64, UINT64, LONG64, ULONG64, or DWORD64) use the I64 flag with %d.

    example:
    INT64 x = 1234567890123456;
    printf("The 64 bit number is: %I64d ",x;)

    As a rule, use %p to display the new pointer types. This will give their full hexadecimal value.

  • Linux*
  • Apple Mac 操作系统 X*
  • Microsoft Windows* (XP, Vista, 7)
  • C/C++
  • 英特尔® C++ 编译器
  • 页面

    订阅 Apple Mac 操作系统 X*