I have the following case:
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_enum.hpp>
template<typename Enum>
class ElementEnum {
public:
void TestFunction();
};
template<typename Enum,typename EnableIf=void>
class Element;
template<typename Enum>
class Element<Enum,typename boost::enable_if<boost::is_enum<Enum> >::type>
: public ElementEnum<Enum>
{};
enum SomeEnum {
Monday,
Red,
FortyTwo,
};
void test()
{
Element<SomeEnum> a;
a.TestFunction();
ElementEnum<SomeEnum> b;
b.TestFunction();
}
The intellisense fails to show anything for variable a, but successfully shows available functions for variable b.
The problem lies in the use of enable_if, where the compiler needs to select the correct overload of Element by using SFINAE.
(http://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error)
Are there any hopes that Visual Assist will ever support this?