code cleanup, interface improvements

This commit is contained in:
badair
2016-04-08 05:27:10 -05:00
parent 326e16c89f
commit f1888031c7
48 changed files with 554 additions and 1208 deletions

View File

@@ -39,11 +39,13 @@ int main() {
using test = ct::add_function_const<f>;
static_assert(std::is_same<test, expect>::value, "");
} {
// add_function_const has no affect on function pointers,
// add_function_const does not compile with function pointers,
// function references, function objects, or member data pointers.
// However, you can loosen this restriction somewhat by using the
// callable_traits::permissive namespace instead:
using f = void(*)();
using expect = void(*)();
using test = ct::add_function_const<f>;
using expect = f;
using test = ct::permissive::add_function_const<f>;
static_assert(std::is_same<test, expect>::value, "");
}
}