2
0
mirror of https://github.com/boostorg/pfr.git synced 2026-01-19 04:22:13 +00:00
Files
pfr/test/precise/tuple_size.cpp
Antony Polukhin 8bb5eb2f33 Update copyright
2019-01-06 20:46:45 +03:00

17 lines
525 B
C++

// Copyright (c) 2016-2019 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/pfr/precise/core.hpp>
int main() {
struct nested { int i; char data[20]; };
struct foo { int i; char c; nested n; };
static_assert(boost::pfr::tuple_size_v<foo> == 3, "");
struct with_reference { int& i; char data; };
static_assert(boost::pfr::tuple_size_v<with_reference> == 2, "");
}