This file is indexed.

/usr/include/flint/flintxx/expression_traits.h is in libflint-dev 2.5.2-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
/*=============================================================================

    This file is part of FLINT.

    FLINT is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    FLINT is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with FLINT; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA

=============================================================================*/
/******************************************************************************

    Copyright (C) 2013 Tom Bachmann

******************************************************************************/

// This file contains helpers recognising expression templates

#ifndef CXX_EXPRESSION_TRAITS_H
#define CXX_EXPRESSION_TRAITS_H

#include "mp.h"
#include "traits.h"

namespace flint {
namespace operations {
// These are the operation tags the expression class creates directly.

// unary operations
struct immediate { };
struct negate { };
struct complement { };

// binary operations
struct plus { };
struct minus { };
struct times { };
struct divided_by { };
struct modulo { };
struct shift { }; // left
struct binary_and { };
struct binary_or { };
struct binary_xor { };
} // operations

namespace traits {
template<class T, class Enable = void>
struct is_expression : mp::false_ { };
template<class T>
struct is_expression<T, typename T::IS_EXPRESSION_MARKER> : mp::true_ { };

template<class T>
struct _is_immediate_expr
    : _is_convertible<
          typename basetype<T>::type::operation_t,
          operations::immediate
        >
{ };

// Compute if T is an expression, with operation "immediate"
template<class T, class Enable = void>
struct is_immediate_expr : _is_immediate_expr<T> { };
template<class T>
struct is_immediate_expr<T,
  typename mp::enable_if<mp::not_<is_expression<T> > >::type>
    : mp::false_ { };

// Compute if T is an immediate expression, *or not an expression at all*
template<class T>
struct is_immediate
    : mp::or_<mp::not_<is_expression<T> >, is_immediate_expr<T> > { };

// Compute if T is a non-immediate expression
template<class T>
struct is_lazy_expr
    : mp::and_<is_expression<T>, mp::not_<is_immediate_expr<T> > > { };

// Compute if Expr is an expression with prescribed evaluated type "T"
template<class Expr, class T, class Enable = void>
struct is_T_expr
    : mp::equal_types<typename Expr::evaluated_t, T> { };
template<class Expr, class T>
struct is_T_expr<Expr, T,
    typename mp::disable_if<traits::is_expression<Expr> >::type>
    : false_ { };

// Decide if an expressing yielding From can be directly evaluated into To.
// To be further specialised!
template<class To, class From, class Enable = void>
struct can_evaluate_into : mp::false_ { };
template<class T>
struct can_evaluate_into<T, T> : mp::true_ { };

// Decide if we should use temporary merging
template<class Expr>
struct use_temporary_merging : mp::true_ { };
} // traits
} // flint

#endif