LCOV - code coverage report
Current view: top level - snapdev - not_used.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 5 5 100.0 %
Date: 2022-02-17 19:51:20 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Copyright (c) 2011-2022  Made to Order Software Corp.  All Rights Reserved
       2             : //
       3             : // https://snapwebsites.org/project/snapdev
       4             : // contact@m2osw.com
       5             : //
       6             : // This program is free software; you can redistribute it and/or modify
       7             : // it under the terms of the GNU General Public License as published by
       8             : // the Free Software Foundation; either version 2 of the License, or
       9             : // (at your option) any later version.
      10             : //
      11             : // This program is distributed in the hope that it will be useful,
      12             : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      13             : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14             : // GNU General Public License for more details.
      15             : //
      16             : // You should have received a copy of the GNU General Public License along
      17             : // with this program; if not, write to the Free Software Foundation, Inc.,
      18             : // 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
      19             : #pragma once
      20             : 
      21             : namespace snapdev
      22             : {
      23             : 
      24             : 
      25             : [[deprecated]] inline constexpr void NOTUSED()
      26             : {
      27             : }
      28             : 
      29             : 
      30             : template <class T, class ...ARGS>
      31             : [[deprecated]] inline constexpr void NOTUSED( T && first, ARGS && ...args )
      32             : {
      33             : #pragma GCC diagnostic push
      34             : #pragma GCC diagnostic ignored "-Wunused-result"
      35             :     static_cast<void>( first );
      36             : #pragma GCC diagnostic pop
      37             :     NOTUSED(args...);
      38             : }
      39             : 
      40             : 
      41           3 : inline constexpr void NOT_USED()
      42             : {
      43           3 : }
      44             : 
      45             : 
      46             : template <class T, class ...ARGS>
      47           3 : inline constexpr void NOT_USED( T && first, ARGS && ...args )
      48             : {
      49             : #pragma GCC diagnostic push
      50             : #pragma GCC diagnostic ignored "-Wunused-result"
      51             :     static_cast<void>( first );
      52             : #pragma GCC diagnostic pop
      53           3 :     NOT_USED(args...);
      54           3 : }
      55             : 
      56             : 
      57             : 
      58             : } // namespace snapdev
      59             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.13