Advertisement
Radfler

::null

Oct 13th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. namespace details {
  2.  
  3.     template<typename Head, typename... Tail>
  4.     void null(Head& head, Tail&... tail) noexcept(noexcept(head = nullptr) && noexcept(null(tail...))) {
  5.  
  6.         head = nullptr;
  7.         null(tail...);
  8.  
  9.     }
  10.  
  11.     template<typename Head>
  12.     void null(Head& head) noexcept(noexcept(head = nullptr)) {
  13.         head = nullptr;
  14.     }
  15.  
  16.     void null() { }
  17.  
  18. }
  19.  
  20. template<typename... Args>
  21. void null(Args&... args) noexcept(noexcept(details::null(args...))) {
  22.     details::null(args...);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement