2
0
mirror of https://github.com/boostorg/hana.git synced 2026-01-22 17:22:30 +00:00
Files
hana/example/record/macros.cpp
2014-11-07 10:57:48 -05:00

42 lines
683 B
C++

/*
@copyright Louis Dionne 2014
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#include <boost/hana/record_macros.hpp>
#include <boost/hana/type.hpp>
#include <string>
using namespace boost::hana;
namespace intrusive {
//! [intrusive]
struct Person {
BOOST_HANA_DEFINE_RECORD_INTRUSIVE(Person,
(std::string, name),
(int, age)
);
};
//! [intrusive]
}
//! [adhoc]
namespace ns {
struct Person {
std::string name;
int age;
};
}
BOOST_HANA_DEFINE_RECORD(ns::Person,
(std::string, name),
(int, age)
);
//! [adhoc]
int main() {
}