Skip to content

Commit fe56b3d

Browse files
committed
New file cstdint.hpp.
1 parent 4d30ce6 commit fe56b3d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// detail/cstdint.hpp
3+
// ~~~~~~~~~~~~~~~~~~
4+
//
5+
// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6+
//
7+
// Distributed under the Boost Software License, Version 1.0. (See accompanying
8+
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9+
//
10+
11+
#ifndef ASIO_DETAIL_CSTDINT_HPP
12+
#define ASIO_DETAIL_CSTDINT_HPP
13+
14+
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15+
# pragma once
16+
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17+
18+
#include "asio/detail/config.hpp"
19+
20+
#if defined(ASIO_HAS_CSTDINT)
21+
# include <cstdint>
22+
#else // defined(ASIO_HAS_CSTDINT)
23+
# include <boost/cstdint.hpp>
24+
#endif // defined(ASIO_HAS_CSTDINT)
25+
26+
namespace asio {
27+
28+
#if defined(ASIO_HAS_CSTDINT)
29+
using std::int16_t;
30+
using std::uint16_t;
31+
using std::int32_t;
32+
using std::uint32_t;
33+
using std::int64_t;
34+
using std::uint64_t;
35+
#else // defined(ASIO_HAS_CSTDINT)
36+
using boost::int16_t;
37+
using boost::uint16_t;
38+
using boost::int32_t;
39+
using boost::uint32_t;
40+
using boost::int64_t;
41+
using boost::uint64_t;
42+
#endif // defined(ASIO_HAS_CSTDINT)
43+
44+
} // namespace asio
45+
46+
#endif // ASIO_DETAIL_CSTDINT_HPP

0 commit comments

Comments
 (0)