var.hpp
来自「Boost provides free peer-reviewed portab」· HPP 代码 · 共 35 行
HPP
35 行
/*============================================================================= Copyright (c) 2003 Martin Wille http://spirit.sourceforge.net/ Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)=============================================================================*/#ifndef BOOST_SPIRIT_TEST_IMPL_VAR_HPP#define BOOST_SPIRIT_TEST_IMPL_VAR_HPP#include <boost/ref.hpp>namespace test{ template <typename T> struct var_wrapper : public ::boost::reference_wrapper<T> { typedef ::boost::reference_wrapper<T> parent; explicit inline var_wrapper(T& t) : parent(t) {} inline T& operator()() const { return parent::get(); } }; template <typename T> inline var_wrapper<T> var(T& t) { return var_wrapper<T>(t); }}#endif // BOOST_SPIRIT_TEST_IMPL_VAR_HPP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?