bool
is_std_allocator (tree ctx)
{
- return (is_std_class (ctx, "allocator")
- || (flag_reflection
- && is_std_class (ctx, "__new_allocator")));
+ return is_std_class (ctx, "allocator");
}
/* Return true if FNDECL is std::allocator<T>::{,de}allocate. */
-bool
+static bool
is_std_allocator_allocate (tree fndecl)
{
tree name = DECL_NAME (fndecl);
extern bool is_static_init_expression (tree);
extern bool is_std_class (tree, const char *);
extern bool is_std_allocator (tree);
-extern bool is_std_allocator_allocate (tree);
extern bool potential_rvalue_constant_expression (tree);
extern bool require_potential_constant_expression (tree);
extern bool require_constant_expression (tree);
if (!consteval_only_p (t))
return NULL_TREE;
+ /* Already escalated? */
if (current_function_decl
- /* Already escalated. */
- && (DECL_IMMEDIATE_FUNCTION_P (current_function_decl)
- /* These functions are magic. */
- || is_std_allocator_allocate (current_function_decl)))
+ && DECL_IMMEDIATE_FUNCTION_P (current_function_decl))
{
*walk_subtrees = false;
return NULL_TREE;
if (!DECL_IMMEDIATE_FUNCTION_P (decl)
&& consteval_only_p (decl)
/* But if the function can be escalated, merrily we roll along. */
- && !immediate_escalating_function_p (decl)
- && !is_std_allocator_allocate (decl))
+ && !immediate_escalating_function_p (decl))
error_at (DECL_SOURCE_LOCATION (decl),
"function of consteval-only type must be declared %qs",
"consteval");
// NB: __n is permitted to be 0. The C++ standard says nothing
// about what the return value is when __n == 0.
- _GLIBCXX_NODISCARD _Tp*
+ _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR _Tp*
allocate(size_type __n, const void* = static_cast<const void*>(0))
{
#if __cplusplus >= 201103L
}
// __p is not permitted to be a null pointer.
- void
+ _GLIBCXX20_CONSTEXPR void
deallocate(_Tp* __p, size_type __n __attribute__ ((__unused__)))
{
#if __cpp_sized_deallocation