xref: /llvm-project/libcxx/include/__random/is_seed_sequence.h (revision 9783f28cbb155e4a8d49c12e1c60ce14dcfaf0c7)
1344cef66SArthur O'Dwyer //===----------------------------------------------------------------------===//
2344cef66SArthur O'Dwyer //
3344cef66SArthur O'Dwyer // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4344cef66SArthur O'Dwyer // See https://llvm.org/LICENSE.txt for license information.
5344cef66SArthur O'Dwyer // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6344cef66SArthur O'Dwyer //
7344cef66SArthur O'Dwyer //===----------------------------------------------------------------------===//
8344cef66SArthur O'Dwyer 
9344cef66SArthur O'Dwyer #ifndef _LIBCPP___RANDOM_IS_SEED_SEQUENCE_H
10344cef66SArthur O'Dwyer #define _LIBCPP___RANDOM_IS_SEED_SEQUENCE_H
11344cef66SArthur O'Dwyer 
12344cef66SArthur O'Dwyer #include <__config>
130a4aa8a1SNikolas Klauser #include <__type_traits/is_convertible.h>
140a4aa8a1SNikolas Klauser #include <__type_traits/is_same.h>
150a4aa8a1SNikolas Klauser #include <__type_traits/remove_cv.h>
16344cef66SArthur O'Dwyer 
17344cef66SArthur O'Dwyer #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
18344cef66SArthur O'Dwyer #  pragma GCC system_header
19344cef66SArthur O'Dwyer #endif
20344cef66SArthur O'Dwyer 
21344cef66SArthur O'Dwyer _LIBCPP_BEGIN_NAMESPACE_STD
22344cef66SArthur O'Dwyer 
23344cef66SArthur O'Dwyer template <class _Sseq, class _Engine>
24*9783f28cSLouis Dionne struct __is_seed_sequence {
25344cef66SArthur O'Dwyer   static _LIBCPP_CONSTEXPR const bool value =
26*9783f28cSLouis Dionne       !is_convertible<_Sseq, typename _Engine::result_type>::value && !is_same<__remove_cv_t<_Sseq>, _Engine>::value;
27344cef66SArthur O'Dwyer };
28344cef66SArthur O'Dwyer 
29344cef66SArthur O'Dwyer _LIBCPP_END_NAMESPACE_STD
30344cef66SArthur O'Dwyer 
31344cef66SArthur O'Dwyer #endif // _LIBCPP___RANDOM_IS_SEED_SEQUENCE_H
32