What steps will reproduce the problem?
1. Define an integer-type flags, e.g. DEFINE_int64(bufferSize, 100, "buffer
size");
2. Allocate a buffer using the flag as the buffer size, e.g. char
buffer[FLAGS_bufferSize];
What is the expected output? What do you see instead?
This fails to compile on MSVC++ 2012, with the error:
error C2057: expected constant expression
What version of the product are you using? On what operating system?
gflags-2.0, Windows 7, statically built gflags lib using MSVC++ 2012.
Please provide any additional information below.
This also fails if I do the intermediate step below:
const int64_t BUF_SIZE = FLAGS_bufferSize;
char buffer[BUF_SIZE];
Original issue reported on code.google.com by Alex.Lou...@gmail.com on 3 Oct 2012 at 4:44
Original issue reported on code.google.com by
Alex.Lou...@gmail.com
on 3 Oct 2012 at 4:44