/usr/include/boost/test/utils/runtime
Edit: /usr/include/boost/test/utils/runtime/modifier.hpp (3890B)
// (C) Copyright Gennadiy Rozental 2001.
// Use, modification, and distribution are 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)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision$
//
// Description : parameter modifiers
// ***************************************************************************
#ifndef BOOST_TEST_UTILS_RUNTIME_MODIFIER_HPP
#define BOOST_TEST_UTILS_RUNTIME_MODIFIER_HPP
// Boost.Test Runtime parameters
#include
// Boost.Test
#include
#include
#include
// New CLA API available only for some C++11 compilers
#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) \
&& !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) \
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) \
&& !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
#define BOOST_TEST_CLA_NEW_API
#endif
namespace boost {
namespace runtime {
// ************************************************************************** //
// ************** environment variable modifiers ************** //
// ************************************************************************** //
namespace {
#ifdef BOOST_TEST_CLA_NEW_API
auto const& description = unit_test::static_constant>::value;
auto const& help = unit_test::static_constant>::value;
auto const& env_var = unit_test::static_constant>::value;
auto const& end_of_params = unit_test::static_constant>::value;
auto const& negation_prefix = unit_test::static_constant>::value;
auto const& value_hint = unit_test::static_constant>::value;
auto const& optional_value = unit_test::static_constant>::value;
auto const& default_value = unit_test::static_constant>::value;
auto const& callback = unit_test::static_constant>::value;
template
using enum_values = unit_test::static_constant<
nfp::typed_keyword>, struct enum_values_t>
>;
#else
nfp::typed_keyword description;
nfp::typed_keyword help;
nfp::typed_keyword env_var;
nfp::typed_keyword end_of_params;
nfp::typed_keyword negation_prefix;
nfp::typed_keyword value_hint;
nfp::keyword optional_value;
nfp::keyword default_value;
nfp::keyword callback;
template
struct enum_values_list {
typedef std::pair ElemT;
typedef std::vector ValuesT;
enum_values_list const&
operator()( cstring k, EnumType v ) const
{
const_cast(this)->m_values.push_back( ElemT( k, v ) );
return *this;
}
operator ValuesT const&() const { return m_values; }
private:
ValuesT m_values;
};
template
struct enum_values : unit_test::static_constant<
nfp::typed_keyword, struct enum_values_t> >
{
};
#endif
} // local namespace
} // namespace runtime
} // namespace boost
#include
#endif // BOOST_TEST_UTILS_RUNTIME_MODIFIER_HPP