QMCPACK
variant_help.hpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2022 QMCPACK developers.
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
8 //
9 // File created by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 #ifndef QMCPLUSPLUS_VARIANT_HELP_HPP
13 #define QMCPLUSPLUS_VARIANT_HELP_HPP
14 
15 /** \file
16  * A collection of functions to help with the use of variants
17  */
18 
19 namespace qmcplusplus
20 {
21 
22 template<class T, class R>
23 constexpr bool has(const R& this_one)
24 {
25  return std::holds_alternative<T>(this_one);
26 }
27 
28 } // namespace qmcplusplus
29 
30 #endif
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
constexpr bool has(const R &this_one)