[cfe-dev] Merging dependent expressions

Douglas Gregor dgregor at apple.com
Sun Mar 6 12:53:31 PST 2011


On Mar 6, 2011, at 12:43 PM, Sebastian Redl wrote:

> Hi again,
> 
> I feel so terribly rusty, having to ask all these questions ...
> 
> Consider:
> 
> const size_t Limit = 16;
> template <typename T>
> void foo() noexcept(sizeof(T) < Limit);
> 
> template <typename U>
> void foo() noexcept(Limit > sizeof(U));
> 
> How are such declarations merged? Do we simply not check dependent noexcept specifiers and hope for the best? Is there some existing functionality in place for revalidating things like these on instantiation? Should I put such functionality in place?


Use the StmtProfiler to check for equivalence of the expressions.

	- Doug



More information about the cfe-dev mailing list