MCPcopy Create free account
hub / github.com/Neargye/magic_enum / operator[]

Method operator[]

include/magic_enum/magic_enum_containers.hpp:369–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367 }
368
369 [[nodiscard]] constexpr reference operator[](E pos) {
370 auto i = index_type::at(pos);
371 return MAGIC_ENUM_ASSERT(i), a[*i];
372 }
373
374 [[nodiscard]] constexpr const_reference operator[](E pos) const {
375 auto i = index_type::at(pos);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected