2048.cpp:355:38: error: non-constant-expression cannot be narrowed from type 'int' to 'uint8_t'
(aka 'unsigned char') in initializer list [-Wc++11-narrowing]
trans_table_entry_t entry = {state.curdepth, res};
^~~~~~~~~~~~~~
2048.cpp:355:38: note: override this message by inserting an explicit cast
trans_table_entry_t entry = {state.curdepth, res};
^~~~~~~~~~~~~~
static_cast<uint8_t>( )
g++ --version output:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
compiling on OSX 10.9 results in a compile error.
error reported by g++:
g++ --version output: