• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://www.boost.org/libs/container for documentation.
8 //
9 //////////////////////////////////////////////////////////////////////////////
10 
11 #include <boost/container/pmr/string.hpp>
12 #include <boost/static_assert.hpp>
13 #include <boost/container/detail/type_traits.hpp>
14 
main()15 int main()
16 {
17    using namespace boost::container;
18    using boost::container::dtl::is_same;
19 
20    typedef basic_string<char, std::char_traits<char>, pmr::polymorphic_allocator<char> > string_t;
21    typedef basic_string<wchar_t, std::char_traits<wchar_t>, pmr::polymorphic_allocator<wchar_t> > wstring_t;
22    BOOST_STATIC_ASSERT(( is_same<string_t, pmr::string>::value ));
23    BOOST_STATIC_ASSERT(( is_same<string_t, pmr::basic_string_of<char>::type>::value ));
24    BOOST_STATIC_ASSERT(( is_same<wstring_t, pmr::wstring>::value ));
25    BOOST_STATIC_ASSERT(( is_same<wstring_t, pmr::basic_string_of<wchar_t>::type>::value ));
26    #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
27       BOOST_STATIC_ASSERT(( is_same<string_t, pmr::string >::value ));
28       BOOST_STATIC_ASSERT(( is_same<wstring_t, pmr::wstring >::value ));
29    #endif
30    return 0;
31 }
32