]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/src/engine/check_cxx11.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / src / engine / check_cxx11.cpp
CommitLineData
f67539c2
TL
1/* Copyright 2020 Rene Rivera
2 * Distributed under the Boost Software License, Version 1.0.
1e59de90 3 * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
f67539c2
TL
4 */
5
6/*
7This program is a compile test for support of C++11. If it compiles
8successfully some key parts of C++11 the B2 engine requires are
9available. This is used by the build script to guess and check the
10compiler to build the engine with.
11*/
12
1e59de90 13// Some headers we test...
f67539c2 14#include <thread>
1e59de90 15#include <memory>
f67539c2
TL
16
17
18int main()
19{
20 // Check for basic thread calls.
1e59de90
TL
21 // [2020-08-19] Mingw-w64 with win32 threading model (as opposed to posix
22 // threading model) does not really have std::thread etc. Please see comments
23 // in sysinfo.cpp.
24 #ifndef _WIN32
f67539c2 25 { auto _ = std::thread::hardware_concurrency(); }
1e59de90
TL
26 #endif
27
28 // [2021-08-07] We check the following C++11 features: brace initialization,
29 // unique_ptr. Plus the author's ability to memorize some digits.
30 { const std::unique_ptr <float> pf {new float {3.14159f}}; }
f67539c2 31}