GNOME Bugzilla – Bug 759247
C++11 unified initializer for array with templates treated as function
Last modified: 2015-12-30 10:19:33 UTC
Following is a contents of a file that defines an array with C++11 unified initialization --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- /// \file /// C++11 array definition extern "C" int coreVectors[] {some_template<int>(0), 0,}; --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- When parsed by doxygen, this is treated as a definition of function "some_template< int >" returning "int coreVectors[]". If there is no >extern "C"<, then the output is correct. It is also correct if there is no template used in initializer. If unified initialization is not used (so there's a "=" between "[]" and "{") the output is correct. If you reverse the order of elements in the array (template is not the first item), then the coreVectors[] is detected as a variable (but the values are not included in the documentation), and there also appears an undocumented entry for "some_template< int > (0)" as a function. The use case that lead me to this problem is using C++-style cast - like reinterpret_cast<>() - in initializer of array.
Confirmed. Should be fixed in the next GIT update.
Great - thanks! (;
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.11. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant (preferably in the form of a self-contained example).