1
0
forked from boostorg/mp11
Files
boost_mp11/doc/mp11/lambda.adoc
joaquintides ead27ca191 Feature/lambda (#96)
* added mp_lambda

* launched GHA

* skipped ICE-generating test in GCC < 4.9

* fixed GCC detection in workaround

* test-skipped and documented GCC 4.8 bug

* added missing s/const/CONST

* tempirarily expanded macro to isolate problem with VS2017

* tried workaround for C3546

* tried another workaround

* wrapped workaround up

* dropped unnecessary devoiding in variadic (member) functions

* temporary code to check VS compliance wrt function qualifiers

* removed version printer

* checked compliance with qualified (member) function partial specialization

* checked each partial specialization individually

* wrapped up VS2013 investigation

* left variadics out of VS2013

* skipped noexcept-involving tests for VS2013 (keyword not supported)

* given up on VS2013 support for mp_lambda

* dropped lambda_devoid_args
2024-10-14 18:15:14 +03:00

35 lines
1.1 KiB
Plaintext

////
Copyright 2024 Joaquin M Lopez Munoz
Distributed under 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
////
[#lambda]
# Lambda, <boost/mp11/lambda.hpp>
:toc:
:toc-title:
:idprefix:
## mp_lambda<T>
template<class T> using mp_lambda = /*...*/;
`mp_lambda<T>` is a quoted metafunction whose nested template `fn<U...>`
returns a type `V` with the same syntactic definition as `T`, except
that occurrences of placeholders in `T` are replaced by the corresponding
element of `U...`.
For example, `mp_lambda<std::pair<_1, _2*>>::fn<int, char>` is `std::pair<int, char*>`.
Replacement does not happen inside those constituent parts of `T` resulting
from the instantiation of a class template with non-type template parameters.
NOTE: In GCC 4.8, a compiler bug results in `const` and `volatile` qualifiers
being stripped from the returned type `V` (except when they are applied to
function or member function types).
NOTE: `mp_lambda` is not supported in VS2013 and prior due to compiler limitations.