Skip to content

jbcoe/cc-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protocol: Structural Subtyping for C++

Language Standard License

We propose the addition of two class templates, protocol<T, A> and protocol_view<T>, to the C++ Standard Library. Both classes support structural-subtyping, protocol is owning, protocol_view is non-owning.

See DRAFT.md for more details on design.

This repository contains both the ISO C++ proposal to add these new library types and a reference implementation. The reference implementation is currently reliant on a Python code-generation step as C++26 reflection is missing some of the features needed to generate code needed by these types at compile time.

Standardization

The paper P4148R2 (derived from DRAFT.md) was presented to the C++ Standard Library Incubator working group in Brno on June 11th 2026. The authors have been encouraged to continue work.

Contributing and Development

For build instructions, testing, contributing guidelines, and a deeper look into the code generation architecture, see CONTRIBUTING.md.

GitHub codespaces

Press . or visit [https://github.dev/jbcoe/cc-protocol] to open the project in an instant, cloud-based, development environment. We have defined a devcontainer that will automatically install the dependencies required to build and test the project.

About

A type erased value-type for C++ using reflection

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Generated from jbcoe/value_types