diff --git a/example/result_of/example.cpp b/example/result_of/example.cpp new file mode 100644 index 0000000..5ebaab4 --- /dev/null +++ b/example/result_of/example.cpp @@ -0,0 +1,34 @@ +/*! +Copyright (c) 2016 Barrett Adair + +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 + +namespace ct = callable_traits; + +using expect = int; + +struct foo; + +template +void test() { + using result = ct::result_of; + static_assert(std::is_same{}, ""); +} + +int main() { + + test(); + test(); + test(); + test(); + test(); + + auto x = []() -> int { return 0; }; + + test(); +} + diff --git a/qtcreator/main/main.cpp b/qtcreator/main/main.cpp index e69de29..5ebaab4 100644 --- a/qtcreator/main/main.cpp +++ b/qtcreator/main/main.cpp @@ -0,0 +1,34 @@ +/*! +Copyright (c) 2016 Barrett Adair + +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 + +namespace ct = callable_traits; + +using expect = int; + +struct foo; + +template +void test() { + using result = ct::result_of; + static_assert(std::is_same{}, ""); +} + +int main() { + + test(); + test(); + test(); + test(); + test(); + + auto x = []() -> int { return 0; }; + + test(); +} + diff --git a/qtcreator/tests_and_examples/tests_and_examples.pro b/qtcreator/tests_and_examples/tests_and_examples.pro index 72a9b24..fa88f9a 100644 --- a/qtcreator/tests_and_examples/tests_and_examples.pro +++ b/qtcreator/tests_and_examples/tests_and_examples.pro @@ -11,3 +11,4 @@ OTHER_FILES += ../../test/*.cpp \ ../../example/signature/*.cpp \ ../../example/apply_member_pointer/*.cpp \ ../../example/remove_member_pointer/*.cpp \ + ../../example/result_of/*.cpp \