Bug 509180 - Evaluate non-dependent metafunction calls in hover for "auto" type
Summary: Evaluate non-dependent metafunction calls in hover for "auto" type
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: Next   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-13 17:24 EST by Nathan Ridge CLA
Modified: 2020-09-04 15:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Ridge CLA 2016-12-13 17:24:01 EST
In this code:

template <typename T>
struct meta {
    typedef T type;
};

template <typename T>
typename meta<T>::type foo(T);

int main() {
    auto waldo = foo(42);
}

if you hover over the "auto" in the declaration of "waldo", the type shown in the hover is "meta<int>::type". There's no reason we can't evaluate this and show the resulting type, "int".