• Huu Nguyen's avatar
    Fix non-constant-expression narrowing · 5642366f
    Huu Nguyen authored
    For OS X, the microseconds field is implemented as an int type. The implicit narrowing in the initializer list throws a compiler error for some compilers with C++11 support turned on. The specific error message is: "error: non-constant-expression cannot be narrowed from type 'long' to '__darwin_suseconds_t' (aka 'int') in initializer list [-Wc++11-narrowing]".
    
    Tested on Clang 5.1.0 and Mac OS X 10.9.4.
    5642366f
select.cpp 5.68 KB