Skip to content

Commit

Permalink
Use is_same from Boost.TypeTraits
Browse files Browse the repository at this point in the history
boost::core::is_same is deprecated, so use the one from Boost.TypeTraits.
  • Loading branch information
Lastique authored Dec 23, 2022
1 parent 932dd48 commit 83e927f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ install:
- git submodule init libs/config
- git submodule init libs/core
- git submodule init libs/headers
- git submodule init libs/type_traits
- git submodule init tools/build
- git submodule init tools/boost_install
- git submodule update
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
git submodule init libs/config
git submodule init libs/core
git submodule init libs/headers
git submodule init libs/type_traits
git submodule init tools/build
git submodule init tools/boost_install
git submodule update
Expand Down Expand Up @@ -170,6 +171,7 @@ jobs:
git submodule init libs/config
git submodule init libs/core
git submodule init libs/static_assert
git submodule init libs/type_traits
git submodule init libs/headers
git submodule init tools/build
git submodule init tools/boost_install
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ install:
- git submodule init libs/config
- git submodule init libs/core
- git submodule init libs/headers
- git submodule init libs/type_traits
- git submodule init tools/build
- git submodule init tools/boost_install
- git submodule update
Expand Down
18 changes: 9 additions & 9 deletions test/ostream_joiner_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,55 @@ Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/io/ostream_joiner.hpp>
#include <boost/core/is_same.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/core/lightweight_test.hpp>
#include <sstream>

void test_char_type()
{
BOOST_TEST((boost::core::is_same<char,
BOOST_TEST((boost::is_same<char,
boost::io::ostream_joiner<const char*>::char_type>::value));
}

void test_traits_type()
{
BOOST_TEST((boost::core::is_same<std::char_traits<char>,
BOOST_TEST((boost::is_same<std::char_traits<char>,
boost::io::ostream_joiner<const char*>::traits_type>::value));
}

void test_ostream_type()
{
BOOST_TEST((boost::core::is_same<std::ostream,
BOOST_TEST((boost::is_same<std::ostream,
boost::io::ostream_joiner<const char*>::ostream_type>::value));
}

void test_iterator_category()
{
BOOST_TEST((boost::core::is_same<std::output_iterator_tag,
BOOST_TEST((boost::is_same<std::output_iterator_tag,
boost::io::ostream_joiner<const char*>::iterator_category>::value));
}

void test_value_type()
{
BOOST_TEST((boost::core::is_same<void,
BOOST_TEST((boost::is_same<void,
boost::io::ostream_joiner<const char*>::value_type>::value));
}

void test_difference_type()
{
BOOST_TEST((boost::core::is_same<void,
BOOST_TEST((boost::is_same<void,
boost::io::ostream_joiner<const char*>::difference_type>::value));
}

void test_pointer()
{
BOOST_TEST((boost::core::is_same<void,
BOOST_TEST((boost::is_same<void,
boost::io::ostream_joiner<const char*>::pointer>::value));
}

void test_reference()
{
BOOST_TEST((boost::core::is_same<void,
BOOST_TEST((boost::is_same<void,
boost::io::ostream_joiner<const char*>::reference>::value));
}

Expand Down

1 comment on commit 83e927f

@pdimov
Copy link
Member

@pdimov pdimov commented on 83e927f Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use BOOST_TEST_TRAIT_SAME here.

Please sign in to comment.