This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Immediate status.

4442. Clarify expr and fn for meta::reflect_object and meta::reflect_function

Section: 21.4.14 [meta.reflection.result] Status: Immediate Submitter: Tomasz KamiƄski Opened: 2025-11-04 Last modified: 2025-11-04

Priority: Not Prioritized

View all issues with Immediate status.

Discussion:

Addresses US 118-179

This should talk about the object/function designated by expr/fn, rather than expr/fn.

[Kona 2025-11-04; approved by LWG. Status changed: New → Immediate.]

Proposed resolution:

This wording is relative to N5014.

  1. Modify 21.4.14 [meta.reflection.result] as indicated:

    template<class T>
      consteval info reflect_object(T& expr);
    

    -7- Mandates: T is an object type.

    -8- Returns: A reflection of the object designated by expr.

    -9- Throws: meta::exception unless expr is if E is not suitable for use as a constant template argument for a constant template parameter of type T& (13.4.3 [temp.arg.nontype]) , where E is an lvalue constant expression that computes the object that expr refers to.

    template<class T>
      consteval info reflect_function(T& fn);
    

    -10- Mandates: T is an function type.

    -11- Returns: A reflection of the function designated by fn.

    -12- Throws: meta::exception unless fn is if F is not suitable for use as a constant template argument for a constant template parameter of type T& (13.4.3 [temp.arg.nontype]) , where F is an lvalue constant expression that computes the function that fn refers to.