use “g++ test.cpp -o test” to compile the file in my attachment,execute test. its output is
v = 3 value = 3 in C constructor
v = 3 value = 3 in C constructor
but, use “clang -ccc-clang-cxx test.cpp -o test” tp compile ,execute test.its output is
v = 3 value = 0 in C constructor
v = 3 value = 3 in C constructor
currently, c++ construction initialization list is not supportted.
|
test.cpp (288 Bytes)