Skip to content

Commit 00da4fa

Browse files
authored
merge develop
2 parents 0ca204f + 25db6a3 commit 00da4fa

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.24)
22

33
project(
44
dice-template-library
5-
VERSION 2.0.0
5+
VERSION 2.0.1
66
DESCRIPTION
77
"This template library is a collection of template-oriented code that we, the Data Science Group at UPB, found pretty handy. It contains: `switch_cases` (Use runtime values in compile-time context), `integral_template_tuple` (Create a tuple-like structure that instantiates a template for a range of values), `integral_template_variant` (A wrapper type for `std::variant` guarantees to only contain variants of the form `T<IX>` and `for_{types,values,range}` (Compile time for loops for types, values or ranges))."
88
HOMEPAGE_URL "https://dice-research.org/")

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ A C++23 compatible compiler. Code was only tested on x86_64.
237237
## Include it in your projects
238238
### Conan
239239
You can use it with [conan](https://conan.io/).
240-
To do so, you need to add `dice-template-library/2.0.0` to the `[requires]` section of your conan file.
240+
To do so, you need to add `dice-template-library/2.0.1` to the `[requires]` section of your conan file.
241241

242242
## Build and Run Tests and Examples
243243

include/dice/template-library/shared_mutex.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace dice::template_library {
7979

8080
private:
8181
value_type value_;
82-
mutex_type mutex_;
82+
mutable mutex_type mutex_;
8383

8484
public:
8585
constexpr shared_mutex() noexcept(std::is_nothrow_default_constructible_v<value_type>) = default;
@@ -137,7 +137,7 @@ namespace dice::template_library {
137137
* @return mutex guard for the inner value
138138
* @throws std::system_error in case the underlying mutex implementation throws it
139139
*/
140-
[[nodiscard]] shared_mutex_guard<value_type const> lock_shared() {
140+
[[nodiscard]] shared_mutex_guard<value_type const> lock_shared() const {
141141
return shared_mutex_guard<value_type const>{std::shared_lock<mutex_type>{mutex_}, value_};
142142
}
143143

@@ -148,7 +148,7 @@ namespace dice::template_library {
148148
* @return nullopt in case the mutex could not be locked, otherwise a mutex guard for the inner value
149149
* @throws std::system_error in case the underlying mutex implementation throws it
150150
*/
151-
[[nodiscard]] std::optional<shared_mutex_guard<value_type const>> try_lock_shared() {
151+
[[nodiscard]] std::optional<shared_mutex_guard<value_type const>> try_lock_shared() const {
152152
std::shared_lock<mutex_type> lock{mutex_, std::try_to_lock};
153153
if (!lock.owns_lock()) {
154154
return std::nullopt;

0 commit comments

Comments
 (0)