From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/boost/libs/spirit/classic/test/impl/var.hpp | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/boost/libs/spirit/classic/test/impl/var.hpp (limited to 'src/boost/libs/spirit/classic/test/impl/var.hpp') diff --git a/src/boost/libs/spirit/classic/test/impl/var.hpp b/src/boost/libs/spirit/classic/test/impl/var.hpp new file mode 100644 index 00000000..d2019452 --- /dev/null +++ b/src/boost/libs/spirit/classic/test/impl/var.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + 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 + +namespace test +{ + template + struct var_wrapper + : public ::boost::reference_wrapper + { + typedef ::boost::reference_wrapper parent; + + explicit inline var_wrapper(T& t) : parent(t) {} + + inline T& operator()() const { return parent::get(); } + }; + + template + inline var_wrapper + var(T& t) + { + return var_wrapper(t); + } +} +#endif // BOOST_SPIRIT_TEST_IMPL_VAR_HPP -- cgit v1.2.3