Skip to content
Snippets Groups Projects
Commit 5237c2c4 authored by Oliver Sander's avatar Oliver Sander
Browse files

[!342] Add a C++14 implementation of C++17's std::variant

Merge branch 'feature/stdvariant' into 'master'

ref:core/dune-common In dune-subgrid we wanted to use std::variant which is
part of C++17's STL ([see e.g. here]). Since the corresponding compilers (or
rather STL implementations) aren't too widespread by now and also out of pure
curiosity, I reimplemented std::variant myself using only C++14 and some of
Dune::Hybrid. In the end I ended up with a implementation that covers most of
the STL functionality and behaves more or less the same way (though it
probably won't be as safe, fast or complete as e.g. the gcc implementation, of
course). If this might be of any value for the Dune project, I'd be happy to
contribute this to dune-common.

See merge request [!342]

  [see e.g. here]: http://en.cppreference.com/w/cpp/utility/variant
  [!342]: gitlab.dune-project.org/core/dune-common/merge_requests/342
parents ef835c4b 259e2ced
Branches
Tags
1 merge request!342Add a C++14 implementation of C++17's std::variant
Pipeline #15466 failed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment