Hacker News new | comments | show | ask | jobs | submit login

You can always be explicit:

    #if WE_ARE_ON_A_TINY_MACHINE
    typedef uint16_t vector_size_t;
    #elif WE_ARE_ON_A_SUPERCOMPUTER
    typedef uint64_t vector_size_t;
    #else
    #error "Unsupported platform."
    #end
That's better than your code which inserts 100,000 things into a vector mysteriously breaking on certain platforms (on which you may or may not have tested your code).



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: