summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/spirit/classic/test/impl/var.hpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/boost/libs/spirit/classic/test/impl/var.hpp
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/spirit/classic/test/impl/var.hpp')
-rw-r--r--src/boost/libs/spirit/classic/test/impl/var.hpp34
1 files changed, 34 insertions, 0 deletions
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 <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