summaryrefslogtreecommitdiff
path: root/libs/type_traits/test/mpl_interop_test1.cpp
blob: 3b90418e9e922103051960476e24f30543d0d8a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

//  (C) Copyright John Maddock 2000. 
//  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)

#include <boost/type_traits/is_void.hpp>

template <class T>
int dispatch_test_imp(const boost::mpl::bool_<true>&)
{
   return 0;
}
template <class T>
int dispatch_test_imp(const boost::mpl::bool_<false>&)
{
   return 1;
}

template <class T>
int dispatch_test()
{
   return dispatch_test_imp<T>(boost::is_void<T>());
}


int main()
{
   return (dispatch_test<int>() == 1) && (dispatch_test<void>() == 0) ? 0 : 1;
}