1 | #ifndef YearMonthDayBase_HPP__ |
2 | #define YearMonthDayBase_HPP__ |
3 | |
4 | /* Copyright (c) 2002,2003 CrystalClear Software, Inc. |
5 | * Use, modification and distribution is subject to the |
6 | * Boost Software License, Version 1.0. (See accompanying |
7 | * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) |
8 | * Author: Jeff Garland |
9 | * $Date$ |
10 | */ |
11 | |
12 | #include <boost/date_time/compiler_config.hpp> |
13 | |
14 | namespace boost { |
15 | namespace date_time { |
16 | |
17 | //! Allow rapid creation of ymd triples of different types |
18 | template<typename YearType, typename MonthType, typename DayType> |
19 | struct BOOST_SYMBOL_VISIBLE year_month_day_base { |
20 | BOOST_CXX14_CONSTEXPR |
21 | year_month_day_base(YearType year, |
22 | MonthType month, |
23 | DayType day); |
24 | |
25 | YearType year; |
26 | MonthType month; |
27 | DayType day; |
28 | typedef YearType year_type; |
29 | typedef MonthType month_type; |
30 | typedef DayType day_type; |
31 | }; |
32 | |
33 | |
34 | //! A basic constructor |
35 | template<typename YearType, typename MonthType, typename DayType> |
36 | inline BOOST_CXX14_CONSTEXPR |
37 | year_month_day_base<YearType,MonthType,DayType>::year_month_day_base(YearType y, |
38 | MonthType m, |
39 | DayType d) : |
40 | year(y), |
41 | month(m), |
42 | day(d) |
43 | {} |
44 | |
45 | } }//namespace date_time |
46 | |
47 | |
48 | #endif |
49 | |
50 | |