Rcpp Version 1.1.2
Loading...
Searching...
No Matches
sets.h
Go to the documentation of this file.
1
// sets.h: Rcpp R/C++ interface class library --
2
//
3
// Copyright (C) 2012 - 2025 Dirk Eddelbuettel and Romain Francois
4
//
5
// This file is part of Rcpp.
6
//
7
// Rcpp is free software: you can redistribute it and/or modify it
8
// under the terms of the GNU General Public License as published by
9
// the Free Software Foundation, either version 2 of the License, or
10
// (at your option) any later version.
11
//
12
// Rcpp is distributed in the hope that it will be useful, but
13
// WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
// GNU General Public License for more details.
16
//
17
// You should have received a copy of the GNU General Public License
18
// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
19
20
#ifndef Rcpp__sugar__sets_h
21
#define Rcpp__sugar__sets_h
22
23
namespace
std
{
24
template
<>
25
struct
hash<Rcpp::String> {
26
std::size_t
operator()
(
const
Rcpp::String
& key)
const
{
27
return
pointer_hasher
( key.
get_sexp
() ) ;
28
}
29
hash<SEXP>
pointer_hasher
;
30
};
31
}
32
33
#endif
Rcpp::String
Definition
String.h:49
Rcpp::String::get_sexp
SEXP get_sexp() const
Definition
String.h:555
std
Definition
String.h:736
std::hash< Rcpp::String >::pointer_hasher
hash< SEXP > pointer_hasher
Definition
sets.h:29
std::hash< Rcpp::String >::operator()
std::size_t operator()(const Rcpp::String &key) const
Definition
sets.h:26
inst
include
Rcpp
sugar
sets.h
Generated on
for Rcpp Version 1.1.2 by
1.15.0