Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

feat: allow template specialization - #598

Closed
ghost wants to merge 2 commits into
mainfrom
unknown repository
Closed

ghost wants to merge 2 commits into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Aug 17, 2023 •

Copy link
Copy Markdown

Resolves #467.
Partially addresses #387 (#387 (comment)).

@ghost

This comment was marked as resolved.

@ghost

This comment was marked as resolved.

@MaxSagebaum MaxSagebaum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, but I have doubts about the choice of the type keyword.

I had problems with the newest version of gcc.

Comment thread source/parse.h Resolved
@ghost
ghost force-pushed the template_specialization branch from 0f4436c to eb04fb1 Compare September 14, 2023 00:39
@ghost ghost changed the title feat: recognize template specialization feat: allow template specialization Sep 14, 2023
@ghost
ghost force-pushed the template_specialization branch from eb04fb1 to 3aa3929 Compare September 22, 2023 18:38
@ghost
ghost force-pushed the template_specialization branch from 3aa3929 to 16174b3 Compare October 3, 2023 19:15
@ghost
ghost force-pushed the template_specialization branch from 16174b3 to dc850fa Compare October 31, 2023 17:08
@ghost
ghost force-pushed the template_specialization branch from 7dd5d76 to 955a8ec Compare November 9, 2023 21:43
@ghost
ghost force-pushed the template_specialization branch from e01a933 to d7cc82a Compare December 11, 2023 15:23
@ghost
ghost force-pushed the template_specialization branch from 3d0c7a2 to 3bfd904 Compare December 23, 2023 16:02
@ghost
ghost force-pushed the template_specialization branch from 3bfd904 to 12ad062 Compare October 2, 2024 12:06
Johel Ernesto Guerrero Peña added 2 commits October 9, 2024 12:44
The syntax is `specialize<specialization_arguments>`
after the optional template parameter list.

Some examples from the tests:
```Cpp2
std: namespace = {
    common_type: @struct @print specialize<outer, outer> type = {
        type: type == outer;
    }
}
v: <T> const i32 = 1;
v: <> specialize<void> const i32 = 2;
v: specialize<i64> const i32 = 3;
v: <T> specialize<* T> std::optional<int> == 6;
```
@ghost
ghost force-pushed the template_specialization branch from b8dc740 to 32d1ebd Compare October 9, 2024 16:46
@hsutter

hsutter commented Oct 31, 2024

Copy link
Copy Markdown
Owner

Hi! Sorry it took me so long to get to this one... but this looks like it might still be current.

Is this up to date, and would you like me to review it?

@hsutter hsutter added the question - further information requested Further information is requested label Oct 31, 2024
@ghost

ghost commented Oct 31, 2024

Copy link
Copy Markdown
Author

Yes, and yes, please do.

@ghost ghost closed this Feb 14, 2025
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question - further information requested Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Add support for defining template specializations.

2 participants