summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/string21
1 files changed, 8 insertions, 13 deletions
diff --git a/libcxx/include/string b/libcxx/include/string
index 96d36f4f7f4..162e54058c4 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -807,8 +807,14 @@ public:
#endif // _LIBCPP_CXX03_LANG
template <class = typename enable_if<__is_allocator<_Allocator>::value, nullptr_t>::type>
- _LIBCPP_INLINE_VISIBILITY
- basic_string(const _CharT* __s);
+ _LIBCPP_INLINE_VISIBILITY
+ basic_string(const _CharT* __s) {
+ _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
+ __init(__s, traits_type::length(__s));
+# if _LIBCPP_DEBUG_LEVEL >= 2
+ __get_db()->__insert_c(this);
+# endif
+ }
template <class = typename enable_if<__is_allocator<_Allocator>::value, nullptr_t>::type>
_LIBCPP_INLINE_VISIBILITY
@@ -1775,17 +1781,6 @@ basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_ty
template <class _CharT, class _Traits, class _Allocator>
template <class>
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s)
-{
- _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
- __init(__s, traits_type::length(__s));
-#if _LIBCPP_DEBUG_LEVEL >= 2
- __get_db()->__insert_c(this);
-#endif
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-template <class>
basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, const _Allocator& __a)
: __r_(__second_tag(), __a)
{
OpenPOWER on IntegriCloud