Answer the question
In order to leave comments, you need to log in
Are auto hints possible for this code?
Just out of curiosity, are there any IDEs that can provide hints for such code?
Of course, you should not write code like this, but I want to know
#define DECLARE_INT_NODE(current, next) \
template<> struct int_node<current> \
{ \
typedef current current_type; \
typedef next next_type; \
};
#define DECLARE_MULTIPLE_NODES(prefix) \
DECLARE_INT_NODE(prefix char, prefix short) \
DECLARE_INT_NODE(prefix short, prefix int) \
DECLARE_INT_NODE(prefix int, prefix long) \
DECLARE_INT_NODE(prefix long, prefix long long) \
template<> struct int_node<prefix long long> \
{ \
typedef prefix long long current_type; \
};
template<class> struct int_node;
DECLARE_MULTIPLE_NODES(signed)
DECLARE_MULTIPLE_NODES(unsigned)
#undef DECLARE_MULTIPLE_NODES
#undef DECLARE_INT_NODE
int_node
, but parses only int_node<unsigned long long>
, and accordingly always shows only the current_type = unsigned long long
int_node
, although if you write, for example, int_node<unsigned short>::
it shows that this type has members current_type = unsigned short
and next_type = unsigned int
int_node
or its members int_node<class>
and about the members of each specific type (like int_node<unsigned short>
) std::string().
, that is, after pressing the dot, it is "silent" std::string s;
s.
then it gives hints after pressing the dot Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question