1 // Copyright (c) 2016-2021 Antony Polukhin 2 // 3 // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6 #include <boost/pfr/core.hpp> 7 main()8int main() { 9 struct nested { int i; char data[20]; }; 10 struct foo { int i; char c; nested n; }; 11 static_assert(boost::pfr::tuple_size_v<foo> == 3, ""); 12 13 struct with_reference { int& i; char data; }; 14 static_assert(boost::pfr::tuple_size_v<with_reference> == 2, ""); 15 } 16 17