1 | // Unit test for boost::lexical_cast. |
---|---|
2 | // |
3 | // See http://www.boost.org for most recent version, including documentation. |
4 | // |
5 | // Copyright Antony Polukhin, 2011-2024. |
6 | // |
7 | // Distributed under the Boost |
8 | // Software License, Version 1.0. (See accompanying file |
9 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). |
10 | |
11 | #include <boost/lexical_cast.hpp> |
12 | |
13 | #include <boost/static_assert.hpp> |
14 | #include <boost/date_time/gregorian/gregorian.hpp> |
15 | #include <boost/date_time/posix_time/posix_time.hpp> |
16 | |
17 | void parseDate() |
18 | { |
19 | std::locale locale; |
20 | boost::date_time::format_date_parser<boost::gregorian::date, wchar_t> parser(L"", locale); |
21 | boost::date_time::special_values_parser<boost::gregorian::date, wchar_t> svp; |
22 | |
23 | boost::gregorian::date date = parser.parse_date(value: L"", format_str: L "", sv_parser: svp); |
24 | (void)date; |
25 | } |
26 | |
27 | |
28 | int main() |
29 | { |
30 | parseDate(); |
31 | return ::boost::lexical_cast<int>(arg: L"1000") == 1000; |
32 | } |
33 | |
34 | |
35 |