-
Implement a simple serialization system - example-serialization.cpp - View in Compiler Explorer Implements an efficient generic serialization procedure from scratch
-
Simple SQL database abstraction - example-dao.cpp - View in Compiler Explorer Implements a basic ORM system which can generate SQL statements at compile-time from model classes using custom properties
-
Iterate base classes with
bases<>
- example-inheritance.cpp - View in Compiler Explorer Uses the built-inbases<>
attribute to iterate over a type's base classes -
Access reflection information at runtime - example-custom-rtti.cpp - View in Compiler Explorer Implements a basic runtime abstraction over refl-cpp which provides access to the reflection metadata at runtime via custom metadata objects
-
XML-based GUI with strongly-types properties - example-binding.cpp - View in Compiler Explorer Implements a system for reading XML resources with refl-cpp, by building a custom runtime reflection layer on top of refl-cpp
-
Implement a generic builder class factory - example-builders.cpp - View in Compiler Explorer Defines a generic
builder<T>
class, which implements the builder pattern for any typeT
. -
Convert fields to accessor methods - example-proxy.cpp - View in Compiler Explorer Uses the proxy feature to create a generic type
value_proxy<T>
which exposes all fields ofT
through accessors methods -
View an array of structs as a struct of arrays - example-struct-of-arrays.cpp - View in Compiler Explorer Uses the proxy feature to create a generic type
struct_of_arrays<T>
which stores all members ofT
instd::vector
, but also has anT operator[](int)
which constructs the individual objects on-demand -
Generate a struct of
std::optional
members - example-partials.cpp - View in Compiler Explorer Uses the proxy feature to create a generic typepartial<T>
which wraps all members ofT
instd::optional
Files
examples
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||