Rename to IsCond<>

This commit is contained in:
Vinnie Falco
2013-09-08 14:54:28 -07:00
parent 270ceb7ceb
commit 34b7599df6
6 changed files with 18 additions and 18 deletions

View File

@@ -73,7 +73,7 @@
<ClInclude Include="..\..\beast\intrusive\PointerTraits.h" /> <ClInclude Include="..\..\beast\intrusive\PointerTraits.h" />
<ClInclude Include="..\..\beast\mpl.h" /> <ClInclude Include="..\..\beast\mpl.h" />
<ClInclude Include="..\..\beast\mpl\AddConst.h" /> <ClInclude Include="..\..\beast\mpl\AddConst.h" />
<ClInclude Include="..\..\beast\mpl\IfConst.h" /> <ClInclude Include="..\..\beast\mpl\IfCond.h" />
<ClInclude Include="..\..\beast\mpl\PointerToOther.h" /> <ClInclude Include="..\..\beast\mpl\PointerToOther.h" />
<ClInclude Include="..\..\beast\mpl\RemoveConst.h" /> <ClInclude Include="..\..\beast\mpl\RemoveConst.h" />
<ClInclude Include="..\..\beast\mpl\RemoveConstVolatile.h" /> <ClInclude Include="..\..\beast\mpl\RemoveConstVolatile.h" />

View File

@@ -878,9 +878,6 @@
<ClInclude Include="..\..\beast\mpl\AddConst.h"> <ClInclude Include="..\..\beast\mpl\AddConst.h">
<Filter>beast\mpl</Filter> <Filter>beast\mpl</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\beast\mpl\IfConst.h">
<Filter>beast\mpl</Filter>
</ClInclude>
<ClInclude Include="..\..\beast\mpl.h"> <ClInclude Include="..\..\beast\mpl.h">
<Filter>beast</Filter> <Filter>beast</Filter>
</ClInclude> </ClInclude>
@@ -1025,6 +1022,9 @@
<ClInclude Include="..\..\modules\beast_asio\http\UniformResourceLocator.h"> <ClInclude Include="..\..\modules\beast_asio\http\UniformResourceLocator.h">
<Filter>beast_asio\http</Filter> <Filter>beast_asio\http</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\beast\mpl\IfCond.h">
<Filter>beast\mpl</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\modules\beast_core\beast_core.cpp"> <ClCompile Include="..\..\modules\beast_core\beast_core.cpp">

View File

@@ -150,10 +150,10 @@ class ForwardListIterator
std::forward_iterator_tag, std::forward_iterator_tag,
typename Container::value_type, typename Container::value_type,
typename Container::difference_type, typename Container::difference_type,
typename mpl::IfConst <IsConst, typename mpl::IfCond <IsConst,
typename Container::const_pointer, typename Container::const_pointer,
typename Container::pointer>::type, typename Container::pointer>::type,
typename mpl::IfConst <IsConst, typename mpl::IfCond <IsConst,
typename Container::const_reference, typename Container::const_reference,
typename Container::reference>::type> typename Container::reference>::type>
{ {
@@ -167,10 +167,10 @@ protected:
public: public:
typedef typename Container::value_type value_type; typedef typename Container::value_type value_type;
typedef typename mpl::IfConst <IsConst, typedef typename mpl::IfCond <IsConst,
typename Container::const_pointer, typename Container::const_pointer,
typename Container::pointer>::type pointer; typename Container::pointer>::type pointer;
typedef typename mpl::IfConst <IsConst, typedef typename mpl::IfCond <IsConst,
typename Container::const_reference, typename Container::const_reference,
typename Container::reference>::type reference; typename Container::reference>::type reference;

View File

@@ -21,7 +21,7 @@
#define BEAST_MPL_H_INCLUDED #define BEAST_MPL_H_INCLUDED
#include "mpl/AddConst.h" #include "mpl/AddConst.h"
#include "mpl/IfConst.h" #include "mpl/IfCond.h"
#include "mpl/PointerToOther.h" #include "mpl/PointerToOther.h"
#include "mpl/RemoveConst.h" #include "mpl/RemoveConst.h"
#include "mpl/RemoveConstVolatile.h" #include "mpl/RemoveConstVolatile.h"

View File

@@ -17,8 +17,8 @@
*/ */
//============================================================================== //==============================================================================
#ifndef BEAST_MPL_IFCONST_H_INCLUDED #ifndef BEAST_MPL_IFCOND_H_INCLUDED
#define BEAST_MPL_IFCONST_H_INCLUDED #define BEAST_MPL_IFCOND_H_INCLUDED
namespace beast { namespace beast {
namespace mpl { namespace mpl {
@@ -28,13 +28,13 @@ namespace mpl {
/// Select between T1 or T2 depending on Condition. /// Select between T1 or T2 depending on Condition.
/// @{ /// @{
template <bool Condition, typename T1, typename T2> template <bool Condition, typename T1, typename T2>
struct IfConst struct IfCond
{ {
typedef T1 type; typedef T1 type;
}; };
template <typename T1, typename T2> template <typename T1, typename T2>
struct IfConst <false, T1, T2> struct IfCond <false, T1, T2>
{ {
typedef T2 type; typedef T2 type;
}; };

View File

@@ -29,23 +29,23 @@ class DynamicListIterator
std::bidirectional_iterator_tag, std::bidirectional_iterator_tag,
typename Container::value_type, typename Container::value_type,
typename Container::difference_type, typename Container::difference_type,
typename mpl::IfConst <IsConst, typename mpl::IfCond <IsConst,
typename Container::const_pointer, typename Container::const_pointer,
typename Container::pointer>::type, typename Container::pointer>::type,
typename mpl::IfConst <IsConst, typename mpl::IfCond <IsConst,
typename Container::const_reference, typename Container::const_reference,
typename Container::reference>::type> typename Container::reference>::type>
{ {
private: private:
typedef typename mpl::IfConst <IsConst, typedef typename mpl::IfCond <IsConst,
typename List <typename Container::Item>::const_iterator, typename List <typename Container::Item>::const_iterator,
typename List <typename Container::Item>::iterator>::type iterator_type; typename List <typename Container::Item>::iterator>::type iterator_type;
typedef typename mpl::IfConst <IsConst, typedef typename mpl::IfCond <IsConst,
typename Container::const_pointer, typename Container::const_pointer,
typename Container::pointer>::type pointer; typename Container::pointer>::type pointer;
typedef typename mpl::IfConst <IsConst, typedef typename mpl::IfCond <IsConst,
typename Container::const_reference, typename Container::const_reference,
typename Container::reference>::type reference; typename Container::reference>::type reference;