GNOME Bugzilla – Bug 691602
[C++11] Problem for associating documentation to the right function for template SFINAE
Last modified: 2013-01-20 13:35:01 UTC
Consider the following code that uses template SFINAE thanks to std::enable_if of C++11: ----------------------------------------------------------- #include <iostream> #include <type_traits> #include <string> struct MyClass { template<typename T, class = typename std::enable_if<std::is_arithmetic<T>::value>::type> void f(const T& x) const; template<typename T, class = typename std::enable_if<!std::is_arithmetic<T>::value>::type, class = void> void f(const T& x) const; }; /// \brief Version 1 template<typename T, class> void MyClass::f(const T& x) const { std::cout<<"Version 1"<<std::endl; } /// \brief Version 2 template<typename T, class, class> void MyClass::f(const T& x) const { std::cout<<"Version 2"<<std::endl; } int main() { MyClass myclass; myclass.f(3); myclass.f(std::string()); return 0; } ----------------------------------------------------------- Doxygen is not able to associate the documentation to each function and produces only documentation for the first one.
Confirmed. Should be fixed in the next subversion update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.3.1. 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.