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// <memory>
10
11// shared_ptr
12
13// template<class T, class... Args>
14// shared_ptr<T> make_shared(Args&&... args);
15
16#include <memory>
17#include <cassert>
18
19#include "test_macros.h"
20
21struct S {
22private:
23 S() {} // ctor is private
24};
25
26int main(int, char**)
27{
28 std::shared_ptr<S> p = std::make_shared<S>();
29
30 return 0;
31}
32

source code of libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp