Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace boost::variant by std::variant #1718

Merged
merged 1 commit into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/gridtools/meta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#pragma once

/**
* C++14 metaprogramming library.
* C++17 metaprogramming library.
*
* Basic Concepts
* ==============
Expand Down
7 changes: 3 additions & 4 deletions include/gridtools/storage/adapter/python_sid_adapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
#include <string>
#include <type_traits>
#include <utility>
#include <variant>

#include <pybind11/pybind11.h>

#include <boost/variant.hpp>

#include "../../common/array.hpp"
#include "../../common/integral_constant.hpp"
#include "../../common/tuple.hpp"
Expand Down Expand Up @@ -207,7 +206,7 @@ namespace gridtools {
struct descr_node {
std::string name;
std::string basic_name;
boost::variant<typestr, descr> type;
std::variant<typestr, descr> type;
std::vector<size_t> shape;
};

Expand Down Expand Up @@ -251,7 +250,7 @@ namespace gridtools {
inline size_t size(typestr const &src) { return src.size; }

inline size_t size(descr_node const &src) {
size_t res = boost::apply_visitor([](auto const &src) { return size(src); }, src.type);
size_t res = std::visit([](auto const &src) { return size(src); }, src.type);
for (auto &&d : src.shape)
res *= d;
return res;
Expand Down