相关疑难解决方法(0)

了解C ++类构造函数中的“内联”吗?

我在Boost库中读取了类address_v4的源代码,并且有几个用BOOST_ASIO_DECL声明的构造函数(定义为内联)

/// Construct an address from raw bytes.
BOOST_ASIO_DECL explicit address_v4(const bytes_type& bytes);

/// Construct an address from a unsigned long in host byte order.
BOOST_ASIO_DECL explicit address_v4(unsigned long addr);
Run Code Online (Sandbox Code Playgroud)

(从此处http://www.boost.org/doc/libs/1_64_0/boost/asio/ip/address_v4.hpp

# define BOOST_ASIO_DECL inline
Run Code Online (Sandbox Code Playgroud)

(从这里http://www.boost.org/doc/libs/1_64_0/boost/asio/detail/config.hpp

那么,为c ++构造函数指定“内联”的目的是什么?它与函数的含义相同还是具有不同的含义?

c++ constructor inline declaration

0
推荐指数
1
解决办法
2103
查看次数

标签 统计

c++ ×1

constructor ×1

declaration ×1

inline ×1