From bb6d2846950405f6d2cb0e769213639d5ff60b2a Mon Sep 17 00:00:00 2001 From: Chip Hogg Date: Sun, 8 Dec 2024 16:09:02 -0500 Subject: [PATCH] Delete old-style `.in` and `.as` APIs These have been deprecated for the entire 0.3.x release cycle. We can remove them now that we're ready to release 0.4.0. Fixes #139. --- au/code/au/quantity.hh | 28 ---------------------------- au/code/au/quantity_point.hh | 28 ---------------------------- 2 files changed, 56 deletions(-) diff --git a/au/code/au/quantity.hh b/au/code/au/quantity.hh index 154fe069..9b307a8e 100644 --- a/au/code/au/quantity.hh +++ b/au/code/au/quantity.hh @@ -190,34 +190,6 @@ class Quantity { } } - // "Old-style" overloads with template parameters, and no function parameters. - // - // Matches the syntax from the CppCon 2021 talk, and legacy Aurora usage. - template - [[deprecated( - "Do not write `.as()`; write `.as(your_units)` instead.")]] constexpr auto - as() const -> decltype(as(U{})) { - return as(U{}); - } - template ::value>> - [[deprecated( - "Do not write `.as()`; write `.as(your_units)` instead.")]] constexpr auto - as() const { - return as(U{}); - } - template - [[deprecated( - "Do not write `.in()`; write `.in(your_units)` instead.")]] constexpr auto - in() const -> decltype(in(U{})) { - return in(U{}); - } - template ::value>> - [[deprecated( - "Do not write `.in()`; write `.in(your_units)` instead.")]] constexpr auto - in() const { - return in(U{}); - } - // "Forcing" conversions, which explicitly ignore safety checks for overflow and truncation. template constexpr auto coerce_as(NewUnit) const { diff --git a/au/code/au/quantity_point.hh b/au/code/au/quantity_point.hh index ae990a2e..7c972e7a 100644 --- a/au/code/au/quantity_point.hh +++ b/au/code/au/quantity_point.hh @@ -154,34 +154,6 @@ class QuantityPoint { .in(associated_unit_for_points(u)); } - // "Old-style" overloads with template parameters, and no function parameters. - // - // Matches the syntax from the CppCon 2021 talk, and legacy Aurora usage. - template - [[deprecated( - "Do not write `.as()`; write `.as(your_units)` instead.")]] constexpr auto - as() const -> decltype(as(U{})) { - return as(U{}); - } - template ::value>> - [[deprecated( - "Do not write `.as()`; write `.as(your_units)` instead.")]] constexpr auto - as() const { - return as(U{}); - } - template - [[deprecated( - "Do not write `.in()`; write `.in(your_units)` instead.")]] constexpr auto - in() const -> decltype(in(U{})) { - return in(U{}); - } - template ::value>> - [[deprecated( - "Do not write `.in()`; write `.in(your_units)` instead.")]] constexpr auto - in() const { - return in(U{}); - } - // "Forcing" conversions, which explicitly ignore safety checks for overflow and truncation. template constexpr auto coerce_as(NewUnit) const {