Skip to content

Commit 31e1660

Browse files
committed
Mark new constexpr helper methods as inline
1 parent 314bacc commit 31e1660

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

include/boost/multiprecision/cpp_int.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace detail {
6666
};
6767

6868
template <class ValT>
69-
static BOOST_MP_CXX14_CONSTEXPR ValT* constexpr_copy(ValT* dest, const ValT* src, std::size_t n)
69+
static inline BOOST_MP_CXX14_CONSTEXPR ValT* constexpr_copy(ValT* dest, const ValT* src, std::size_t n)
7070
{
7171
# ifndef BOOST_MP_NO_CONSTEXPR_DETECTION
7272
if (BOOST_MP_IS_CONST_EVALUATED(n))
@@ -85,8 +85,8 @@ namespace detail {
8585
return dest + n;
8686
}
8787

88-
template <class DestT>
89-
static BOOST_MP_CXX14_CONSTEXPR DestT* constexpr_zero_trivial(DestT* dest, std::size_t n)
88+
template <class ValT>
89+
static inline BOOST_MP_CXX14_CONSTEXPR ValT* constexpr_zero_trivial(ValT* dest, std::size_t n)
9090
{
9191
# ifndef BOOST_MP_NO_CONSTEXPR_DETECTION
9292
if (BOOST_MP_IS_CONST_EVALUATED(n))
@@ -99,14 +99,14 @@ namespace detail {
9999
else
100100
# endif
101101
{
102-
std::memset(static_cast<void*>(dest), 0, n * sizeof(DestT));
102+
std::memset(static_cast<void*>(dest), 0, n * sizeof(ValT));
103103
}
104104

105105
return dest + n;
106106
}
107107

108108
template <class Allocator>
109-
static BOOST_MP_CXX20_DYNAMIC_ALLOC_CONSTEXPR
109+
static inline BOOST_MP_CXX20_DYNAMIC_ALLOC_CONSTEXPR
110110
typename std::allocator_traits<Allocator>::pointer constexpr_allocate_default_constructible(Allocator& alloc, std::size_t const n)
111111
{
112112
typename std::allocator_traits<Allocator>::pointer ptr = alloc.allocate(n);
@@ -125,7 +125,7 @@ namespace detail {
125125
}
126126

127127
template <class Allocator>
128-
static BOOST_MP_CXX20_DYNAMIC_ALLOC_CONSTEXPR
128+
static inline BOOST_MP_CXX20_DYNAMIC_ALLOC_CONSTEXPR
129129
void constexpr_deallocate_trivially_destructible(Allocator& alloc, typename std::allocator_traits<Allocator>::pointer data, std::size_t const n)
130130
{
131131
# if !defined(BOOST_MP_NO_CONSTEXPR_DETECTION) && defined(BOOST_MP_HAS_CONSTEXPR_DYNAMIC_ALLOC)
@@ -141,7 +141,7 @@ namespace detail {
141141
alloc.deallocate(data, n);
142142
}
143143

144-
static BOOST_MP_CXX14_CONSTEXPR std::size_t constexpr_strlen(const char* str)
144+
static inline BOOST_MP_CXX14_CONSTEXPR std::size_t constexpr_strlen(const char* str)
145145
{
146146
# ifndef BOOST_MP_NO_CONSTEXPR_DETECTION
147147
if (BOOST_MP_IS_CONST_EVALUATED(str))

0 commit comments

Comments
 (0)