<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/spelling-the-type-of-a-self-parameter-with-reflection-lyvr1ghs0" -->

---
title: Spelling the type of a “self” parameter with Reflection
description: A discussion from the std-proposals mailing list explores how C++26 Reflection can reduce boilerplate when using C++23's explicit object parameter ('deducing...
canonical: https://daily.dev/posts/spelling-the-type-of-a-self-parameter-with-reflection-lyvr1ghs0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Spelling the type of a “self” parameter with Reflection | daily.dev
og:description: A discussion from the std-proposals mailing list explores how C++26 Reflection can reduce boilerplate when using C++23's explicit object parameter ('deducing...
og:url: https://daily.dev/posts/spelling-the-type-of-a-self-parameter-with-reflection-lyvr1ghs0
og:image: https://api.daily.dev/og/posts/lyvR1GHs0.png
og:image:alt: Spelling the type of a “self” parameter with Reflection
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Spelling the type of a “self” parameter with Reflection

**[Arthur O'Dwyer](https://daily.dev/sources/quuxplusone)** · 2 min read · 0 upvotes · 0 comments

## Summary

A discussion from the std-proposals mailing list explores how C++26 Reflection can reduce boilerplate when using C++23's explicit object parameter ('deducing this') syntax without auto. By defining a Self alias via std::meta::current_class(), and further factoring it into a template with a defaulted reflection argument, the repetitive spelling of a class's own name inside member function signatures can be shortened, including in special member function declarations like copy constructors and assignment operators. The author notes the calling-convention difference (pass-by-value self vs pointer-based this) and remains skeptical about actually using this pattern in real codebases despite finding it an interesting idea.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://quuxplusone.github.io/blog/2026/09/15/self>

## Questions this post answers

### How can I avoid repeating my class name when using C++23's explicit object parameter (deducing this) syntax?

Define a type alias using C++26 Reflection: 'using Self = [: std::meta::current_class() :];' inside the class, then use 'this Self self' in member functions instead of spelling out the full class name. This avoids the error-prone repetition of a lengthy class name in every member function signature that uses explicit object parameters without auto.

_Developers tracking new C++ reflection idioms can follow proposals like this through daily.dev._

### Why can't I just use 'auto' for the explicit object parameter type in a C++23 member function?

Using auto for the self parameter turns the member function into a template, which changes its semantics compared to a non-template member function. This means developers who want ordinary (non-templated) member function behavior must spell out the concrete class type explicitly for the 'this Self self' parameter rather than relying on auto deduction.

_Anyone weighing C++23 syntax trade-offs can keep up with these nuances via daily.dev._

## Similar posts on daily.dev

- [How ref qualifiers let to deducing this](https://daily.dev/posts/how-ref-qualifiers-let-to-deducing-this-jcejr6bif) · Meeting C\+\+ · 0 upvotes · 0 comments
- [C\+\+26 Reflection gives us universal template parameters](https://daily.dev/posts/c-26-reflection-gives-us-universal-template-parameters-rzixrpk5v) · Arthur O'Dwyer · 2 upvotes · 0 comments
- [Flavours of Reflection — Semantics](https://daily.dev/posts/flavours-of-reflection-semantics-b70oldr8z) · C\+\+ · 1 upvotes · 0 comments
- [Do concepts improve deducing this?](https://daily.dev/posts/do-concepts-improve-deducing-this--1vvtz9lie) · Meeting C\+\+ · 0 upvotes · 0 comments

---

Tags: [#c++](https://daily.dev/tags/c++), [#language-design](https://daily.dev/tags/language-design)

[View this post on daily.dev](https://daily.dev/posts/spelling-the-type-of-a-self-parameter-with-reflection-lyvr1ghs0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Spelling the type of a “self” parameter with Reflection","url":"https://daily.dev/posts/spelling-the-type-of-a-self-parameter-with-reflection-lyvr1ghs0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/spelling-the-type-of-a-self-parameter-with-reflection-lyvr1ghs0"},"datePublished":"2026-09-15T18:20:17.248Z","dateModified":"2026-09-15T18:20:37.784Z","description":"A discussion from the std-proposals mailing list explores how C++26 Reflection can reduce boilerplate when using C++23's explicit object parameter ('deducing...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e3a9783d2dc46301158849c96a3b989b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e3a9783d2dc46301158849c96a3b989b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Arthur O'Dwyer","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Arthur O'Dwyer","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/a789aa2fcdb64c219980d6d6901791e9","url":"https://daily.dev/sources/quuxplusone"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/spelling-the-type-of-a-self-parameter-with-reflection-lyvr1ghs0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c++,language-design","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Arthur O'Dwyer","item":"https://daily.dev/sources/quuxplusone"},{"@type":"ListItem","position":3,"name":"Spelling the type of a “self” parameter with Reflection"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/spelling-the-type-of-a-self-parameter-with-reflection-lyvr1ghs0#faq","mainEntity":[{"@type":"Question","name":"How can I avoid repeating my class name when using C++23's explicit object parameter (deducing this) syntax?","acceptedAnswer":{"@type":"Answer","text":"Define a type alias using C++26 Reflection: 'using Self = [: std::meta::current_class() :];' inside the class, then use 'this Self self' in member functions instead of spelling out the full class name. This avoids the error-prone repetition of a lengthy class name in every member function signature that uses explicit object parameters without auto. Developers tracking new C++ reflection idioms can follow proposals like this through daily.dev."}},{"@type":"Question","name":"Why can't I just use 'auto' for the explicit object parameter type in a C++23 member function?","acceptedAnswer":{"@type":"Answer","text":"Using auto for the self parameter turns the member function into a template, which changes its semantics compared to a non-template member function. This means developers who want ordinary (non-templated) member function behavior must spell out the concrete class type explicitly for the 'this Self self' parameter rather than relying on auto deduction. Anyone weighing C++23 syntax trade-offs can keep up with these nuances via daily.dev."}}]}
```

