Niall Douglas

Show:

What's happening?

  • Won't compile in C++ mode on MSVC

    uthash assumes the existence of typeof() when being compiled as C++ - unfortunately MSVC does not implement typeof() and hence it won't compile. Here is a C++ metaprogramming implementation of typeof() for MSVC (taken from http://www.nedproductions.biz/blog/2009/11/09/implementing-typeof-in-microsofts-c-compiler): #if defined(_MSC_VER) && _MSC_VER>=1400 namespace msvc_typeof_impl { /*...

    2009-11-11 14:30:53 UTC in uthash

  • Won't compile on MSVC9 or older compilers

    Found one bug in uthash v1.8: it uses a C99 header which isn't supported on older compilers, so you need to do this instead: #if __STDC_VERSION__ >= 199901L /* C99 or better */ #include /* uint32_t etc */ #else typedef unsigned int uint32_t; #endif I also have a suggestion which seems eminently useful: #define HASH_FIND_PTR(head,findptr,out) \...

    2009-11-11 14:27:14 UTC in uthash

About Me

  • 2003-06-05 (7 years ago)
  • 794325
  • ned14 (My Site)
  • Niall Douglas

Send me a message