brintos

brintos / llvm-project-archived public Read only

0
0
Text · 780 B · a9e0373 Raw
32 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// UNSUPPORTED: c++0310 11// <functional>12 13// See https://llvm.org/PR2000214 15#include <functional>16#include <type_traits>17 18#include "test_macros.h"19 20using Fn = std::function<void()>;21struct S : public std::function<void()> { using function::function; };22 23int main(int, char**) {24    S s( [](){} );25    S f1( s );26#if TEST_STD_VER <= 1427    S f2(std::allocator_arg, std::allocator<int>{}, s);28#endif29 30  return 0;31}32