blob: 705673aec847727120838bbadf3cc5f3fa96b909 [file] [log] [blame]
Brian Silverman4a2409e2018-08-04 23:24:02 -07001[/
2Copyright 2018 Glen Joseph Fernandes
3<glenjofe -at- gmail.com>
4
5Distributed under the Boost Software License,
6Version 1.0. (See accompanying file LICENSE_1_0.txt
7or copy at http://www.boost.org/LICENSE_1_0.txt).
8]
9
10[section:is_detected_exact is_detected_exact]
11
12 template<class Expected, template<class...> class Op, class... Args>
13 using is_detected_exact = is_same<Expected, detected_t<Op, Args...> >;
14
15 template<class Expected, template<class...> class Op, class... Args>
16 constexpr bool is_detected_exact_v = is_detected_exact<Op, Args...>::value;
17
18__std_paper [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4502.pdf N4502]
19
20__compat Requires C++11 variadic templates and C++11 template aliases.
21
22__header `#include <boost/type_traits/is_detected_exact.hpp>`
23
24The type `is_detected_exact<To, Op, Args>` is an alias for __true_type if the result of
25`Op<Args>` is type `To`. Otherwise it's the type __false_type;
26
27
28__examples
29
30 template<class T>
31 using difference_t = typename T::difference_type;
32
33 static_assert(boost::is_detected_exact_v<std::ptrdiff_t, difference_t, T>);
34
35See also: __is_detected, __is_detected_convertible.
36
37[endsect]