xref: /freebsd-src/contrib/llvm-project/libcxx/include/__random/is_seed_sequence.h (revision cb14a3fe5122c879eae1fb480ed7ce82a699ddb6)
14824e7fdSDimitry Andric //===----------------------------------------------------------------------===//
24824e7fdSDimitry Andric //
34824e7fdSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44824e7fdSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
54824e7fdSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
64824e7fdSDimitry Andric //
74824e7fdSDimitry Andric //===----------------------------------------------------------------------===//
84824e7fdSDimitry Andric 
94824e7fdSDimitry Andric #ifndef _LIBCPP___RANDOM_IS_SEED_SEQUENCE_H
104824e7fdSDimitry Andric #define _LIBCPP___RANDOM_IS_SEED_SEQUENCE_H
114824e7fdSDimitry Andric 
124824e7fdSDimitry Andric #include <__config>
1306c3fb27SDimitry Andric #include <__type_traits/is_convertible.h>
1406c3fb27SDimitry Andric #include <__type_traits/is_same.h>
1506c3fb27SDimitry Andric #include <__type_traits/remove_cv.h>
164824e7fdSDimitry Andric 
174824e7fdSDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
184824e7fdSDimitry Andric #  pragma GCC system_header
194824e7fdSDimitry Andric #endif
204824e7fdSDimitry Andric 
214824e7fdSDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
224824e7fdSDimitry Andric 
234824e7fdSDimitry Andric template <class _Sseq, class _Engine>
24*cb14a3feSDimitry Andric struct __is_seed_sequence {
254824e7fdSDimitry Andric   static _LIBCPP_CONSTEXPR const bool value =
26*cb14a3feSDimitry Andric       !is_convertible<_Sseq, typename _Engine::result_type>::value && !is_same<__remove_cv_t<_Sseq>, _Engine>::value;
274824e7fdSDimitry Andric };
284824e7fdSDimitry Andric 
294824e7fdSDimitry Andric _LIBCPP_END_NAMESPACE_STD
304824e7fdSDimitry Andric 
314824e7fdSDimitry Andric #endif // _LIBCPP___RANDOM_IS_SEED_SEQUENCE_H
32