1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// Make sure that std::random_device is not available in namespace std:: when
10// libc++ is built without support for random device.
11
12// REQUIRES: no-random-device
13
14#include <random>
15
16void f() {
17 std::random_device d; // expected-error {{no type named 'random_device' in namespace 'std'}}
18}
19

source code of libcxx/test/libcxx/numerics/rand/rand.device/has-no-random-device.verify.cpp