diff --git a/example/src/list.cpp b/example/src/list.cpp index 858932cf..8a579e6c 100644 --- a/example/src/list.cpp +++ b/example/src/list.cpp @@ -539,7 +539,7 @@ IS_SAME( ); IS_SAME( - metal::sort>, // use default ordering relation + metal::sort>, // use default ordering metal::sort, metal::lambda> ); /// [sort] diff --git a/include/metal/list/sort.hpp b/include/metal/list/sort.hpp index def77d93..c10e05f8 100644 --- a/include/metal/list/sort.hpp +++ b/include/metal/list/sort.hpp @@ -31,8 +31,6 @@ namespace metal { /// using result = metal::sort; /// \endcode /// - /// \tip{`lbd` may be omitted, in which case it defaults to `metal::lambda`.} - /// /// \pre: For any two \values `val_i` and `val_j` contained in `l` /// `metal::invoke` returns a \number /// \returns: \list @@ -45,15 +43,25 @@ namespace metal { /// such that `metal::invoke{} != false` for all /// `i` in `[0, m-2]`. /// + /// \tip{`lbd` may be omitted, in which case it defaults to `metal::lambda`.} + /// /// ### Example /// \snippet list.cpp sort /// /// ### See Also /// \see list, reverse, rotate +#if !defined(METAL_WORKAROUND) + template> + using sort = detail::call< + detail::_sort::template type, + metal::if_, seq>>; +#else + // MSVC 14 has shabby SFINAE support in case of default alias template args template using sort = detail::call< detail::_sort::template type, metal::if_, seq>>; +#endif } #include "../lambda/lambda.hpp"