mirror of
https://github.com/boostorg/callable_traits.git
synced 2026-02-11 11:42:15 +00:00
37 lines
858 B
C++
37 lines
858 B
C++
/*
|
|
|
|
Copyright Barrett Adair 2016
|
|
Distributed under the Boost Software License, Version 1.0.
|
|
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
|
|
|
*/
|
|
|
|
#include <type_traits>
|
|
#include <callable_traits/callable_traits.hpp>
|
|
|
|
struct foo {
|
|
void operator()(int);
|
|
void operator()(char);
|
|
};
|
|
|
|
namespace ct = callable_traits;
|
|
|
|
int main() {
|
|
|
|
{
|
|
using test = ct::no_sfinae::args<foo>;
|
|
using expect = ct::invalid_type;
|
|
static_assert(std::is_same<test, expect>{}, "");
|
|
} {
|
|
using test = ct::no_sfinae::function_type<foo>;
|
|
using expect = ct::invalid_type;
|
|
static_assert(std::is_same<test, expect>{}, "");
|
|
} {
|
|
using test = ct::no_sfinae::result_of<foo>;
|
|
using expect = ct::invalid_type;
|
|
static_assert(std::is_same<test, expect>{}, "");
|
|
}
|
|
|
|
return 0;
|
|
}
|