Skip to content

Commit b831d69

Browse files
jjerphanKlaim
andcommitted
Constrain template type parameters
Co-authored-by: Klaim (Joël Lamotte) <[email protected]>
1 parent 418c541 commit b831d69

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libmamba/tests/src/util/test_synchronized_value.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ namespace
169169
REQUIRE(current_value->x == expected_result);
170170
}
171171

172-
template <typename MutexType>
172+
template <mamba::util::Mutex MutexType>
173173
void test_synchronized_value_basics()
174174
{
175175
using synchronized_value = mamba::util::synchronized_value<ValueType, MutexType>;
@@ -297,15 +297,15 @@ namespace
297297
}
298298

299299
// Factorized initializer-list test
300-
template <typename MutexType>
300+
template <mamba::util::Mutex MutexType>
301301
void test_synchronized_value_initializer_list()
302302
{
303303
using synchronized_value = mamba::util::synchronized_value<std::vector<int>, MutexType>;
304304
synchronized_value values{ 1, 2, 3, 4 };
305305
}
306306

307307
// Factorized apply example test
308-
template <typename MutexType>
308+
template <mamba::util::Mutex MutexType>
309309
void test_synchronized_value_apply_example()
310310
{
311311
using synchronized_value = mamba::util::synchronized_value<std::vector<int>, MutexType>;
@@ -319,15 +319,15 @@ namespace
319319
}
320320

321321
// Factorized thread-safe direct_access test
322-
template <typename MutexType>
322+
template <mamba::util::Mutex MutexType>
323323
void test_synchronized_value_threadsafe_direct_access()
324324
{
325325
using synchronized_value = mamba::util::synchronized_value<ValueType, MutexType>;
326326
test_concurrent_increment<MutexType>([](synchronized_value& sv) { sv->x += 1; });
327327
}
328328

329329
// Factorized thread-safe synchronize test
330-
template <typename MutexType>
330+
template <mamba::util::Mutex MutexType>
331331
void test_synchronized_value_threadsafe_synchronize()
332332
{
333333
using synchronized_value = mamba::util::synchronized_value<ValueType, MutexType>;
@@ -341,7 +341,7 @@ namespace
341341
}
342342

343343
// Factorized thread-safe apply test
344-
template <typename MutexType>
344+
template <mamba::util::Mutex MutexType>
345345
void test_synchronized_value_threadsafe_apply()
346346
{
347347
using synchronized_value = mamba::util::synchronized_value<ValueType, MutexType>;
@@ -350,7 +350,7 @@ namespace
350350
}
351351

352352
// Factorized thread-safe multiple synchronize test
353-
template <typename MutexType>
353+
template <mamba::util::Mutex MutexType>
354354
void test_synchronized_value_threadsafe_multiple_synchronize()
355355
{
356356
using synchronized_value = mamba::util::synchronized_value<ValueType, MutexType>;

0 commit comments

Comments
 (0)