Skip to content

Releases: oskarirauta/property_cpp

Release list

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 27 Jun 22:30
Release v2.0.0

Make the template work for every type, optimise it, and clarify the
study material.

- the default setter was a hardcoded [](int&, int) lambda, so Property<T>
  failed to compile for any T other than int (including the std::string
  specialisation the header already advertised). Make it generic.
- pass values by const reference in the getter, setter and operator= so
  larger types are not copied needlessly
- include <ostream>/<string> so the header is self-contained
- stream through hidden friend operator<< that works for any streamable
  T, replacing the std::string-only overloads
- ReadOnly now forbids assignment with a deleted operator= (a clear
  compile-time error) instead of the deferred static_assert trick
- the getter return type drops a meaningless top-level const

Rewrite the example into a single coherent Sensor type that demonstrates
each property kind (plain, computed read-only, validating setter,
std::string, compile-time read-only) and catches the read-only throw, so
it no longer aborts. Rewrite the README as a short, self-contained
explanation with a worked snippet.

Build with -Wall -Wextra, and refresh the GitHub Actions (checkout@v5,
create/upload actions @v2, push/pull_request triggers, drop the
unnecessary submodule step).

Note: the getter/setter signatures (now const T&) and operator='s return
type changed, so this is a breaking change for existing callbacks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 14 Apr 09:29
Release v1.0.0

Initial release

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>