implement 'switch' construct
[SVN r17633]
This commit is contained in:
1 parent
a9ca707add
commit
b5979f51cd
3 files changed
+117
-4
No files matched your search
@@ -3,7 +3,7 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2000-02
|
||||
// Copyright (c) 2000-03
|
||||
// Aleksey Gurtovoy
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software
|
||||
@@ -17,20 +17,30 @@
|
||||
#ifndef BOOST_MPL_SELECT2ND_HPP_INCLUDED
|
||||
#define BOOST_MPL_SELECT2ND_HPP_INCLUDED
|
||||
|
||||
#include "boost/mpl/aux_/lambda_spec.hpp"
|
||||
#include "boost/mpl/aux_/void_spec.hpp"
|
||||
#include "boost/mpl/aux_/lambda_support.hpp"
|
||||
#include "boost/mpl/aux_/config/eti.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace mpl {
|
||||
|
||||
template<
|
||||
typename Pair
|
||||
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Pair)
|
||||
>
|
||||
struct select2nd
|
||||
{
|
||||
typedef typename Pair::second type;
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,select2nd,(Pair))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_LAMBDA_SPEC(1, select2nd)
|
||||
#if defined(BOOST_MPL_MSVC_60_ETI_BUG)
|
||||
template<> struct select2nd<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
|
||||
BOOST_MPL_AUX_VOID_SPEC(1, select2nd)
|
||||
|
||||
} // namespace mpl
|
||||
} // namespace boost
|
||||
|
||||
Reference in new issue
Block a user