Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361604 - Template resolution problem with sizeof expression
Summary: Template resolution problem with sizeof expression
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0.2   Edit
Assignee: Sergey Prigogin CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-21 00:06 EDT by Sergey Prigogin CLA
Modified: 2011-10-24 01:23 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 Sergey Prigogin CLA 2011-10-21 00:06:57 EDT
The following code example is derived from boost::ptr_vector:

template<bool V, typename T>
struct C {
  typedef int s;
};

template<typename T>
struct C<false, T> {
  typedef T s;
};

struct B {
  typedef B u;
};

typedef C<sizeof(char) == sizeof(int), B> r;
typedef r::s t;
t::u x;  // problem on t::u
Comment 1 Sergey Prigogin CLA 2011-10-21 00:34:23 EDT
A test case for this bug is in AST2TemplateTests._testBoolExpressionAsTemplateArgument_361604().
Comment 2 Sergey Prigogin CLA 2011-10-24 00:55:16 EDT
Fixed in cdt_8_0 and master.
Comment 3 CDT Genie CLA 2011-10-24 01:23:01 EDT
*** cdt git genie on behalf of Sergey Prigogin ***

    Bug 361604 - Template resolution problem with sizeof expression.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=a83da09772f91b66f2616c52066ab18fc766e015
Comment 4 CDT Genie CLA 2011-10-24 01:23:03 EDT
*** cdt git genie on behalf of Sergey Prigogin ***

    Bug 361604 - Template resolution problem with sizeof expression.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=859779742468f8085e89f01b84cd2828bf54d1cc