forked from boostorg/unordered
Set length of primes inside template on Sun C++. Refs #3854
[SVN r59200]
This commit is contained in:
@ -32,12 +32,6 @@ namespace boost { namespace unordered_detail {
|
|||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
// primes
|
// primes
|
||||||
|
|
||||||
template<class T> struct prime_list_template
|
|
||||||
{
|
|
||||||
static std::size_t const value[];
|
|
||||||
static std::ptrdiff_t const length;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define BOOST_UNORDERED_PRIMES \
|
#define BOOST_UNORDERED_PRIMES \
|
||||||
(5ul)(11ul)(17ul)(29ul)(37ul)(53ul)(67ul)(79ul) \
|
(5ul)(11ul)(17ul)(29ul)(37ul)(53ul)(67ul)(79ul) \
|
||||||
(97ul)(131ul)(193ul)(257ul)(389ul)(521ul)(769ul) \
|
(97ul)(131ul)(193ul)(257ul)(389ul)(521ul)(769ul) \
|
||||||
@ -47,14 +41,28 @@ namespace boost { namespace unordered_detail {
|
|||||||
(50331653ul)(100663319ul)(201326611ul)(402653189ul)(805306457ul) \
|
(50331653ul)(100663319ul)(201326611ul)(402653189ul)(805306457ul) \
|
||||||
(1610612741ul)(3221225473ul)(4294967291ul)
|
(1610612741ul)(3221225473ul)(4294967291ul)
|
||||||
|
|
||||||
|
template<class T> struct prime_list_template
|
||||||
|
{
|
||||||
|
static std::size_t const value[];
|
||||||
|
|
||||||
|
#if !defined(SUNPRO_CC)
|
||||||
|
static std::ptrdiff_t const length;
|
||||||
|
#else
|
||||||
|
static std::ptrdiff_t const length
|
||||||
|
= BOOST_PP_SEQ_SIZE(BOOST_UNORDERED_PRIMES);
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
std::size_t const prime_list_template<T>::value[] = {
|
std::size_t const prime_list_template<T>::value[] = {
|
||||||
BOOST_PP_SEQ_ENUM(BOOST_UNORDERED_PRIMES)
|
BOOST_PP_SEQ_ENUM(BOOST_UNORDERED_PRIMES)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !defined(SUNPRO_CC)
|
||||||
template<class T>
|
template<class T>
|
||||||
std::ptrdiff_t const prime_list_template<T>::length
|
std::ptrdiff_t const prime_list_template<T>::length
|
||||||
= BOOST_PP_SEQ_SIZE(BOOST_UNORDERED_PRIMES);
|
= BOOST_PP_SEQ_SIZE(BOOST_UNORDERED_PRIMES);
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef BOOST_UNORDERED_PRIMES
|
#undef BOOST_UNORDERED_PRIMES
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user