-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[examples] GeoZones improvements, ImageUI fix
- Loading branch information
Showing
4 changed files
with
169 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
#include <halp/static_string.hpp> | ||
|
||
#include <string_view> | ||
namespace halp | ||
{ | ||
|
||
template <halp::static_string lit, typename T> | ||
struct addr_port | ||
{ | ||
static clang_buggy_consteval auto name() { return std::string_view{lit.value}; } | ||
static clang_buggy_consteval auto path() { return std::string_view{lit.value}; } | ||
operator T&() noexcept { return value; } | ||
operator const T&() const noexcept { return value; } | ||
auto& operator=(const T& t) noexcept | ||
{ | ||
value = t; | ||
return *this; | ||
} | ||
auto& operator=(T&& t) noexcept | ||
{ | ||
value = std::move(t); | ||
return *this; | ||
} | ||
|
||
// Running value (last value before the tick started) | ||
T value{}; | ||
}; | ||
|
||
} |