19 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// Make sure that std::random_device is not available in namespace std:: when10// libc++ is built without support for random device.11 12// REQUIRES: no-random-device13 14#include <random>15 16void f() {17 std::random_device d; // expected-error {{no type named 'random_device' in namespace 'std'}}18}19