[exec.get.env]

# 33 Execution control library [[exec]](./#exec)

## 33.5 Queries [[exec.queries]](exec.queries#exec.get.env)

### 33.5.4 execution​::​get_env [exec.get.env]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L906)

execution​::​get_env is a customization point object[.](#1.sentence-1)

For a subexpression o,execution​::​get_env(o) is expression-equivalent to:

- [(1.1)](#1.1)

  *MANDATE-NOTHROW*(*AS-CONST*(o).get_env()) if that expression is well-formed[.](#1.1.sentence-1)
  *Mandates*: The type of the expression above satisfies[*queryable*](exec.queryable.concept#concept:queryable "33.2.2 queryable concept [exec.queryable.concept]") ([[exec.queryable]](exec.queryable "33.2 Queries and queryables"))[.](#1.1.sentence-2)

- [(1.2)](#1.2)

  Otherwise, env<>{}[.](#1.2.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L922)

The value of get_env(o) shall be valid while o is valid[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L925)

[*Note [1](#note-1)*:

When passed a sender object,get_env returns the sender's associated attributes[.](#3.sentence-1)

When passed a receiver,get_env returns the receiver's associated execution environment[.](#3.sentence-2)

â *end note*]
