STD::_NOT_FN(3cxx)

🌸 NAME 🌸

okay bestie, welcome to the std::_Not_fn< _Fn > page β€” manual section 3cxx, no cap. NAME is literally: std::_Not_fn< _Fn > β€” Generalized negator. πŸ’…

✨ SYNOPSIS ✨

bestie, before you can even look at this cutie, you need the include:

#include <functional>

πŸŽ€ Public Member Functions πŸŽ€

here's the whole member-function lineup, exactly as the page serves it. do not edit the code block, I'm begging:

       template<typename _Fn2 > constexpr _Not_fn (_Fn2 &&__fn, int)
       _Not_fn (_Not_fn &&__fn)=default
       _Not_fn (const _Not_fn &__fn)=default
       template<typename... _Args, typename  = enable_if_t<!__is_invocable<_Fn
           && , _Args...>::value>> void operator() (_Args &&... __args)
           &&=delete
       template<typename... _Args, typename  = enable_if_t<!__is_invocable<_Fn
           & , _Args...>::value>> void operator() (_Args &&... __args) &=delete
       template<typename... _Args, typename  = enable_if_t<!__is_invocable<_Fn
           const && , _Args...>::value>> void operator() (_Args &&... __args)
           const &&=delete
       template<typename... _Args, typename  = enable_if_t<!__is_invocable<_Fn
           const & , _Args...>::value>> void operator() (_Args &&... __args)
           const &=delete

like, that's the entire set β€” constructors, move/copy defaults, and all four deleted operator() overloads with their enable_if_t<!__is_invocable<...>> gates. periodt. πŸ’€

πŸ¦‹ Public Attributes πŸ¦‹

and under Public Attributes, the page lists four more operator() declarations β€” this time the enable_if_t<__is_invocable<...>> versions, with decltype(_S_not< __inv_res_t< ... > >()) and noexcept(...) situations. copying exactly: 🫢

       template<typename... _Args, typename  = enable_if_t<__is_invocable<_Fn
           && , _Args...>::value>> constexpr decltype(_S_not< __inv_res_t< _Fn
           &&, _Args... > >()) operator() (_Args &&... __args)
           &&noexcept(__is_nothrow_invocable< _Fn &&, _Args... >::value
           &&noexcept(_S_not< __inv_res_t< _Fn &&, _Args... > >()))
       template<typename... _Args, typename  = enable_if_t<__is_invocable<_Fn
           & , _Args...>::value>> constexpr decltype(_S_not< __inv_res_t< _Fn
           &, _Args... > >()) operator() (_Args &&... __args)
           &noexcept(__is_nothrow_invocable< _Fn &, _Args... >::value
           &&noexcept(_S_not< __inv_res_t< _Fn &, _Args... > >()))
       template<typename... _Args, typename  = enable_if_t<__is_invocable<_Fn
           const && , _Args...>::value>> constexpr decltype(_S_not<
           __inv_res_t< _Fn const &&, _Args... > >()) operator() (_Args &&...
           __args) const &&noexcept(__is_nothrow_invocable< _Fn const &&,
           _Args... >::value &&noexcept(_S_not< __inv_res_t< _Fn const &&,
           _Args... > >()))
       template<typename... _Args, typename  = enable_if_t<__is_invocable<_Fn
           const & , _Args...>::value>> constexpr decltype(_S_not< __inv_res_t<
           _Fn const &, _Args... > >()) operator() (_Args &&... __args) const
           &noexcept(__is_nothrow_invocable< _Fn const &, _Args... >::value
           &&noexcept(_S_not< __inv_res_t< _Fn const &, _Args... > >()))

these are the ones with &&, &, const &&, and const & qualifiers, plus the corresponding noexcept checks. iykyk. ✨

πŸ’– Detailed Description πŸ’–

the detailed description is short and iconic:

   template<typename _Fn>
       class std::_Not_fn< _Fn >"Generalized negator.

that quote mark is in the original, bestie β€” I'm not touching it. πŸ’…

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code.


mwah πŸ’‹ β€” source/version: libstdc++; date: the original footer doesn't list one, so I'm not inventing a date, bestie. 🫢

πŸ“¦ where this page comes from