Skip to content

Commit

Permalink
Added a test for #57.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpark committed Jan 12, 2019
1 parent 5b12756 commit a2c291a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ if(MPARK_VARIANT_INCLUDE_MPARK_TESTS)
get
hash
intro
issue
json
mod
relops
Expand Down
19 changes: 19 additions & 0 deletions test/issue.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// MPark.Variant
//
// Copyright Michael Park, 2015-2017
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)

#include <mpark/variant.hpp>

#include <memory>
#include <vector>

#include <gtest/gtest.h>

// https://github.com/mpark/variant/pull/57
TEST(Issue, 57) {
std::vector<mpark::variant<int, std::unique_ptr<int>>> vec;
vec.emplace_back(0);
}

0 comments on commit a2c291a

Please sign in to comment.