2
0
mirror of https://github.com/boostorg/uuid.git synced 2026-01-19 04:42:16 +00:00

Add compile-fail tests for random_provider

This commit is contained in:
Peter Dimov
2024-04-20 20:06:59 +03:00
parent 82737eb87f
commit 098600f0dc
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// (c) Copyright Andrey Semashev 2018
// (c) Copyright Peter Dimov 2024
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// The test verifies that random_generator is not copy constructible
#include <boost/uuid/detail/random_provider.hpp>
int main()
{
boost::uuids::detail::random_provider prov1;
boost::uuids::detail::random_provider prov2(prov1);
return 1;
}

View File

@@ -0,0 +1,18 @@
// (c) Copyright Andrey Semashev 2018
// (c) Copyright Peter Dimov 2024
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// The test verifies that random_generator is not copy assignable
#include <boost/uuid/detail/random_provider.hpp>
int main()
{
boost::uuids::detail::random_provider prov1, prov2;
prov2 = prov1;
return 1;
}