blob: c726f684c35a2f28ca25539691d0dac8805ad57d [file] [log] [blame]
Eric Fiselier80e66ac2016-11-23 01:02:51 +00001// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
Chandler Carruth57b08b02019-01-19 10:56:40 +00004// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Eric Fiselier80e66ac2016-11-23 01:02:51 +00007//
8//===----------------------------------------------------------------------===//
9
10// UNSUPPORTED: c++98, c++03, c++11, c++14
11
12// <variant>
13
14// struct monostate {};
15
16#include <type_traits>
17#include <variant>
18
Marshall Clow7fc6a552019-05-31 18:35:30 +000019#include "test_macros.h"
20
JF Bastien2df59c52019-02-04 20:31:13 +000021int main(int, char**) {
Eric Fiselier80e66ac2016-11-23 01:02:51 +000022 using M = std::monostate;
23 static_assert(std::is_trivially_default_constructible<M>::value, "");
24 static_assert(std::is_trivially_copy_constructible<M>::value, "");
25 static_assert(std::is_trivially_copy_assignable<M>::value, "");
26 static_assert(std::is_trivially_destructible<M>::value, "");
27 constexpr M m{};
28 ((void)m);
JF Bastien2df59c52019-02-04 20:31:13 +000029
30 return 0;
Eric Fiselier80e66ac2016-11-23 01:02:51 +000031}