C++ Logo

STD-PROPOSALS

Advanced search

Subject: [std-proposals] Remove non-type template limitations for consteval functions
From: Bastien penavayre (bastienpenava_at_[hidden])
Date: 2021-02-24 06:01:11


Hi,
Currently, non-type templates still have several limitations:
- must be structural (no private members)
- no allocations even if the type has a constexpr destructor
- can't contain floating point (double or float)
- can't hold strings of the "const char *" form
and so on...

These limitations have a good reason behind them for templated class and
function as they produce symbols in assembly and need to be resolved.

But as consteval functions never produce assembly/symbols and will never be
resolved by another translation unit than their own these restrictions
should be lifted.

What are your thoughts on this?
Am I missing something?

Thanks in advance,
Bastien Penavayre



STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups