File: variants.hpp

package info (click to toggle)
quantlib 1.41-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,480 kB
  • sloc: cpp: 400,885; makefile: 6,547; python: 214; sh: 150; lisp: 86
file content (19 lines) | stat: -rw-r--r-- 433 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

#ifndef quantlib_utilities_variants_hpp
#define quantlib_utilities_variants_hpp

namespace QuantLib::detail {

    // Helper type for use with std::visit.
    template <class... Ts>
    struct variant_visitor : Ts... {
        using Ts::operator()...;
    };

    template <class... Ts>
    variant_visitor(Ts...) -> variant_visitor<Ts...>;

}

#endif