Skip to content

Commit

Permalink
Partially rolling back recent changes as those broke other platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Sep 15, 2017
1 parent 2945dcd commit 2f8b7b8
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 19 deletions.
Expand Up @@ -397,11 +397,11 @@ namespace hpx
/// \param symbolic_name The (optional) name to register the newly
/// created vector
///
template <typename DistPolicy,
typename U = typename std::enable_if<
traits::is_distribution_policy<DistPolicy>::value
>::type>
partitioned_vector(size_type size, DistPolicy const& policy);
template <typename DistPolicy>
partitioned_vector(size_type size, DistPolicy const& policy,
typename std::enable_if<
traits::is_distribution_policy<DistPolicy>::value
>::type* = nullptr);

/// Constructor which create and initialize vector with the
/// given \a where all elements are initialized with \a val and
Expand All @@ -413,11 +413,12 @@ namespace hpx
/// \param symbolic_name The (optional) name to register the newly
/// created vector
///
template <typename DistPolicy,
typename U = typename std::enable_if<
template <typename DistPolicy>
partitioned_vector(size_type size, T const& val,
DistPolicy const& policy,
typename std::enable_if<
traits::is_distribution_policy<DistPolicy>::value
>::type>
partitioned_vector(size_type size, T const& val, DistPolicy const& policy);
>::type* = nullptr);

/// Copy construction performs a deep copy of the right hand side
/// vector.
Expand Down
Expand Up @@ -512,10 +512,12 @@ namespace hpx
}

template <typename T, typename Data /*= std::vector<T> */>
template <typename DistPolicy, typename U>
template <typename DistPolicy>
HPX_PARTITIONED_VECTOR_SPECIALIZATION_EXPORT
partitioned_vector<T, Data>::partitioned_vector(size_type size,
DistPolicy const& policy)
DistPolicy const& policy,
typename std::enable_if<
traits::is_distribution_policy<DistPolicy>::value>::type*)
: size_(size)
, partition_size_(std::size_t(-1))
{
Expand All @@ -524,10 +526,12 @@ namespace hpx
}

template <typename T, typename Data /*= std::vector<T> */>
template <typename DistPolicy, typename U>
template <typename DistPolicy>
HPX_PARTITIONED_VECTOR_SPECIALIZATION_EXPORT
partitioned_vector<T, Data>::partitioned_vector(size_type size, T const& val,
DistPolicy const& policy)
DistPolicy const& policy,
typename std::enable_if<
traits::is_distribution_policy<DistPolicy>::value>::type* /*= nullptr*/)
: size_(size)
, partition_size_(std::size_t(-1))
{
Expand Down
Expand Up @@ -14,6 +14,13 @@

HPX_REGISTER_PARTITIONED_VECTOR(double);

// an out-of-line definition of a member of a class template cannot have default
// arguments
#if defined(HPX_MSVC)
#pragma warning(push)
#pragma warning(disable: 5037)
#endif

template class HPX_PARTITIONED_VECTOR_EXPORT
hpx::server::partitioned_vector<double, std::vector<double>>;
template class HPX_PARTITIONED_VECTOR_EXPORT
Expand All @@ -22,8 +29,13 @@ template class HPX_PARTITIONED_VECTOR_EXPORT
hpx::partitioned_vector<double, std::vector<double>>;
template HPX_PARTITIONED_VECTOR_EXPORT
hpx::partitioned_vector<double, std::vector<double>>::partitioned_vector(
size_type, hpx::container_distribution_policy const&);
size_type, hpx::container_distribution_policy const&, void*);
template HPX_PARTITIONED_VECTOR_EXPORT
hpx::partitioned_vector<double, std::vector<double>>::partitioned_vector(
size_type, double const&, hpx::container_distribution_policy const&);
size_type, double const&, hpx::container_distribution_policy const&,
void*);

#if defined(HPX_MSVC)
#pragma warning(pop)
#endif

Expand Up @@ -14,6 +14,13 @@

HPX_REGISTER_PARTITIONED_VECTOR(int);

// an out-of-line definition of a member of a class template cannot have default
// arguments
#if defined(HPX_MSVC)
#pragma warning(push)
#pragma warning(disable: 5037)
#endif

template class HPX_PARTITIONED_VECTOR_EXPORT
hpx::server::partitioned_vector<int, std::vector<int>>;
template class HPX_PARTITIONED_VECTOR_EXPORT
Expand All @@ -22,8 +29,13 @@ template class HPX_PARTITIONED_VECTOR_EXPORT
hpx::partitioned_vector<int, std::vector<int>>;
template HPX_PARTITIONED_VECTOR_EXPORT
hpx::partitioned_vector<int, std::vector<int>>::partitioned_vector(
size_type, hpx::container_distribution_policy const&);
size_type, hpx::container_distribution_policy const&, void*);
template HPX_PARTITIONED_VECTOR_EXPORT
hpx::partitioned_vector<int, std::vector<int>>::partitioned_vector(
size_type, int const&, hpx::container_distribution_policy const&);
size_type, int const&, hpx::container_distribution_policy const&,
void*);

#if defined(HPX_MSVC)
#pragma warning(pop)
#endif

Expand Up @@ -17,6 +17,13 @@ using std_string = std::string;

HPX_REGISTER_PARTITIONED_VECTOR(std_string);

// an out-of-line definition of a member of a class template cannot have default
// arguments
#if defined(HPX_MSVC)
#pragma warning(push)
#pragma warning(disable: 5037)
#endif

template class HPX_PARTITIONED_VECTOR_EXPORT
hpx::server::partitioned_vector<std::string, std::vector<std::string>>;
template class HPX_PARTITIONED_VECTOR_EXPORT
Expand All @@ -25,8 +32,14 @@ template class HPX_PARTITIONED_VECTOR_EXPORT
hpx::partitioned_vector<std::string, std::vector<std::string>>;
template HPX_PARTITIONED_VECTOR_EXPORT
hpx::partitioned_vector<std::string, std::vector<std::string>>::
partitioned_vector(size_type, hpx::container_distribution_policy const&);
partitioned_vector(size_type, hpx::container_distribution_policy const&,
void*);
template HPX_PARTITIONED_VECTOR_EXPORT
hpx::partitioned_vector<std::string, std::vector<std::string>>::
partitioned_vector(size_type, std::string const&,
hpx::container_distribution_policy const&);
hpx::container_distribution_policy const&, void*);

#if defined(HPX_MSVC)
#pragma warning(pop)
#endif

0 comments on commit 2f8b7b8

Please sign in to comment.