@@ -103,6 +103,26 @@ namespace callable {
103103 static_assert (_Callable<decltype ([](int ) {}), long >);
104104 static_assert (_Callable<decltype ([](conversion_target) {}), with_conversion>);
105105 static_assert (!_Callable<decltype ([](conversion_target) {}), with_explicit_conversion>);
106+
107+ // Check nothrow
108+ static_assert (!_Nothrow_callable<void (*)()>);
109+ static_assert (!_Nothrow_callable<void (*)(), int >);
110+ static_assert (!_Nothrow_callable<void (*)(int ), int >);
111+ static_assert (!_Nothrow_callable<void (*)(int ), char >);
112+ static_assert (!_Nothrow_callable<void (*)(int ), short >);
113+ static_assert (!_Nothrow_callable<void (*)(int ), long >);
114+ static_assert (!_Nothrow_callable<void (*)(conversion_target), with_conversion>);
115+ static_assert (!_Nothrow_callable<void (*)(conversion_target), with_explicit_conversion>);
116+
117+ static_assert (_Nothrow_callable<decltype ([]() noexcept {})>);
118+ static_assert (!_Nothrow_callable<decltype ([]() noexcept {}), int >);
119+ static_assert (_Nothrow_callable<decltype ([](int ) noexcept {}), int >);
120+ static_assert (_Nothrow_callable<decltype ([](int ) noexcept {}), char >);
121+ static_assert (_Nothrow_callable<decltype ([](int ) noexcept {}), short >);
122+ static_assert (_Nothrow_callable<decltype ([](int ) noexcept {}), long >);
123+ static_assert (_Nothrow_callable<decltype ([](int ) noexcept {}), long >);
124+ static_assert (_Nothrow_callable<decltype ([](conversion_target) noexcept {}), with_conversion>);
125+ static_assert (!_Nothrow_callable<decltype ([](conversion_target) noexcept {}), with_explicit_conversion>);
106126} // namespace callable
107127
108128// Matching declarations
0 commit comments