Skip to content

Add reverse mapping for default values in base class specialization#56032

Closed
j-piasecki wants to merge 1 commit intofacebook:mainfrom
j-piasecki:export-D95933835
Closed

Add reverse mapping for default values in base class specialization#56032
j-piasecki wants to merge 1 commit intofacebook:mainfrom
j-piasecki:export-D95933835

Conversation

@j-piasecki
Copy link
Contributor

Summary:
Changelog: [Internal]

When generating xml output, doxygen replaces template arguments in specialized base classes with the default values:

template <typename T = int>
class Test : public Base<T> {};

becomes

template <typename T = int>
class Test : public Base<int> {};

To work around this issue, this diff adds reverse mapping for template params in the base classes. In the above case, the map would be: { "int" -> "T" }, and int in Base<int> would be replaced with T.

This approach assumes that none of the default values are used directly in the base class specialization, which holds for the React Native codebase.

Differential Revision: D95933835

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 10, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 10, 2026

@j-piasecki has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95933835.

Copy link
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 11, 2026
…acebook#56032)

Summary:

Changelog: [Internal]

When generating xml output, doxygen replaces template arguments in specialized base classes with the default values:

```
template <typename T = int>
class Test : public Base<T> {};
```

becomes

```
template <typename T = int>
class Test : public Base<int> {};
```

To work around this issue, this diff adds reverse mapping for template params in the base classes. In the above case, the map would be: `{ "int" -> "T" }`, and `int` in `Base<int>` would be replaced with T.

This approach assumes that none of the default values are used directly in the base class specialization, which holds for the React Native codebase.

Reviewed By: cortinico

Differential Revision: D95933835
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 11, 2026
…acebook#56032)

Summary:

Changelog: [Internal]

When generating xml output, doxygen replaces template arguments in specialized base classes with the default values:

```
template <typename T = int>
class Test : public Base<T> {};
```

becomes

```
template <typename T = int>
class Test : public Base<int> {};
```

To work around this issue, this diff adds reverse mapping for template params in the base classes. In the above case, the map would be: `{ "int" -> "T" }`, and `int` in `Base<int>` would be replaced with T.

This approach assumes that none of the default values are used directly in the base class specialization, which holds for the React Native codebase.

Reviewed By: cortinico

Differential Revision: D95933835
…acebook#56032)

Summary:
Pull Request resolved: facebook#56032

Changelog: [Internal]

When generating xml output, doxygen replaces template arguments in specialized base classes with the default values:

```
template <typename T = int>
class Test : public Base<T> {};
```

becomes

```
template <typename T = int>
class Test : public Base<int> {};
```

To work around this issue, this diff adds reverse mapping for template params in the base classes. In the above case, the map would be: `{ "int" -> "T" }`, and `int` in `Base<int>` would be replaced with T.

This approach assumes that none of the default values are used directly in the base class specialization, which holds for the React Native codebase.

Reviewed By: cortinico

Differential Revision: D95933835
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @j-piasecki in a5daece

When will my fix make it into a release? | How to file a pick request?

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 11, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 11, 2026

This pull request has been merged in a5daece.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants