mirror of
https://github.com/boostorg/conversion.git
synced 2026-08-04 04:24:11 +02:00
Compare commits
13 Commits
boost-1.84.0
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| 827dd94c68 | |||
| 782e083f61 | |||
| 1e6424563d | |||
| 6632ca9309 | |||
| b74a4c34cb | |||
| 452adac97f | |||
| 5f82d5aa7d | |||
| 9d64c899df | |||
| 35a71f0701 | |||
| 8a860e05d0 | |||
| 9f285ef0c4 | |||
| 5f36c2c710 | |||
| 41e62ed851 |
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -17,6 +17,9 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: gcc-14 # Do not remove! It is the only toolset that tests CMake tests down below
|
||||
cxxstd: "03,11,14,17,20"
|
||||
os: ubuntu-24.04
|
||||
- toolset: gcc-12
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-22.04
|
||||
@@ -31,7 +34,7 @@ jobs:
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
@@ -59,8 +62,19 @@ jobs:
|
||||
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--depth 10 --jobs 3" $LIBRARY
|
||||
./bootstrap.sh
|
||||
./b2 -d0 headers
|
||||
./b2 -j4 variant=debug tools/inspect/build
|
||||
./b2 -j4 variant=debug tools/inspect
|
||||
|
||||
- name: Run CMake tests
|
||||
if: ${{matrix.toolset == 'gcc-14'}}
|
||||
run: |
|
||||
cd ../boost-root/
|
||||
mkdir __build
|
||||
cd __build
|
||||
cmake -DBUILD_TESTING=1 -DBOOST_INCLUDE_LIBRARIES=conversion -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_C_COMPILER=gcc-14 ..
|
||||
cmake --build . --target tests
|
||||
ctest --output-on-failure --no-tests=error
|
||||
cd ..
|
||||
rm -rf __build
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
@@ -101,19 +115,19 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: msvc-14.2
|
||||
- toolset: msvc-14.3
|
||||
cxxstd: "14,17,latest"
|
||||
addrmd: 32,64
|
||||
os: windows-2019
|
||||
os: windows-2025
|
||||
- toolset: gcc
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
addrmd: 64
|
||||
os: windows-2019
|
||||
os: windows-2025
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Boost
|
||||
shell: cmd
|
||||
@@ -135,7 +149,21 @@ jobs:
|
||||
git submodule update --init tools/boostdep
|
||||
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--jobs 3" %LIBRARY%
|
||||
cmd /c bootstrap
|
||||
b2 -d0 headers
|
||||
|
||||
- name: Run CMake tests
|
||||
if: ${{matrix.toolset == 'msvc-14.3'}}
|
||||
shell: cmd
|
||||
run: |
|
||||
choco install --no-progress ninja
|
||||
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64
|
||||
cd ../boost-root/
|
||||
mkdir __build
|
||||
cd __build
|
||||
cmake -DBUILD_TESTING=1 -DBOOST_INCLUDE_LIBRARIES=conversion ..
|
||||
cmake --build . --target tests --config Debug
|
||||
ctest --output-on-failure --no-tests=error -C Debug
|
||||
cd ..
|
||||
rm -rf __build
|
||||
|
||||
- name: Run tests
|
||||
shell: cmd
|
||||
|
||||
+5
-2
@@ -2,7 +2,7 @@
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required( VERSION 3.5...3.20 )
|
||||
cmake_minimum_required( VERSION 3.5...4.20 )
|
||||
project( boost_conversion VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX )
|
||||
|
||||
add_library( boost_conversion INTERFACE )
|
||||
@@ -14,6 +14,9 @@ target_link_libraries( boost_conversion
|
||||
INTERFACE
|
||||
Boost::assert
|
||||
Boost::config
|
||||
Boost::smart_ptr
|
||||
Boost::throw_exception
|
||||
)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
@@ -5,8 +5,8 @@ Boost.Conversion is one of the [Boost C++ Libraries](https://github.com/boostorg
|
||||
|
||||
@ | Build | Tests coverage | More info
|
||||
----------------|-------------- | -------------- |-----------
|
||||
Develop branch: | [](https://github.com/boostorg/conversion/actions/workflows/ci.yml) [](https://ci.appveyor.com/project/apolukhin/conversion/branch/develop) | [](https://coveralls.io/github/boostorg/conversion?branch=develop) | [details...](https://www.boost.org/development/tests/develop/developer/conversion.html)
|
||||
Master branch: | [](https://github.com/boostorg/conversion/actions/workflows/ci.yml) [](https://ci.appveyor.com/project/apolukhin/conversion/branch/master) | [](https://coveralls.io/github/boostorg/conversion?branch=master) | [details...](https://www.boost.org/development/tests/master/developer/conversion.html)
|
||||
Develop branch: | [](https://github.com/boostorg/conversion/actions/workflows/ci.yml) [](https://ci.appveyor.com/project/apolukhin/conversion/branch/develop) | [](https://coveralls.io/github/boostorg/conversion?branch=develop) | [details...](https://regression.boost.io/develop/developer/conversion.html)
|
||||
Master branch: | [](https://github.com/boostorg/conversion/actions/workflows/ci.yml) [](https://ci.appveyor.com/project/apolukhin/conversion/branch/master) | [](https://coveralls.io/github/boostorg/conversion?branch=master) | [details...](https://regression.boost.io/master/developer/conversion.html)
|
||||
|
||||
[Latest developer documentation](https://www.boost.org/doc/libs/develop/doc/html/conversion.html)
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# Copyright René Ferdinand Rivera Morell 2023-2024
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
require-b2 5.2 ;
|
||||
|
||||
constant boost_dependencies :
|
||||
/boost/assert//boost_assert
|
||||
/boost/config//boost_config
|
||||
/boost/throw_exception//boost_throw_exception ;
|
||||
|
||||
project /boost/conversion
|
||||
: common-requirements
|
||||
<include>include
|
||||
;
|
||||
|
||||
explicit
|
||||
[ alias boost_conversion : : : : <library>$(boost_dependencies) ]
|
||||
[ alias all : boost_conversion test ]
|
||||
;
|
||||
|
||||
call-if : boost-library conversion
|
||||
;
|
||||
|
||||
+10
-13
@@ -1,6 +1,6 @@
|
||||
[/
|
||||
Copyright 2016 Mikhail Maximov.
|
||||
Copyright Antony Polukhin, 2020-2023.
|
||||
Copyright Antony Polukhin, 2020-2026.
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
@@ -12,7 +12,7 @@
|
||||
[id conversion]
|
||||
[version 1.7]
|
||||
[authors [Stroustrup, Bjarne], [Abrahams, Dave], [Rasin, Boris], [Polukhin, Antony]]
|
||||
[copyright 2001 Beman Dawes, 2014-2023 Antony Polukhin]
|
||||
[copyright 2001 Beman Dawes, 2014-2026 Antony Polukhin]
|
||||
[license
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -30,8 +30,7 @@ The Conversion Library improves program safety and clarity by performing
|
||||
otherwise messy conversions. It includes cast-style function templates designed
|
||||
to complement the C++ Standard's built-in casts.
|
||||
|
||||
To reduce coupling, particularly to standard library IOStreams,
|
||||
the Boost Conversion Library is supplied by several headers:
|
||||
To reduce coupling, the Boost Conversion Library is supplied by several headers:
|
||||
|
||||
# The [@boost:boost/polymorphic_cast.hpp boost/polymorphic_cast.hpp] header
|
||||
provides [link polymorphic_cast `polymorphic_cast<>`] and
|
||||
@@ -42,8 +41,6 @@ the Boost Conversion Library is supplied by several headers:
|
||||
[link polymorphic_pointer_cast `polymorphic_pointer_downcast<>`]
|
||||
# The [@boost:boost/implicit_cast.hpp boost/implicit_cast.hpp] header provides `implicit_cast<>`
|
||||
to perform implicit casts only (no down-cast, no void*->T*, no U->T if T has only explicit constructors for U).
|
||||
# The [@boost:boost/lexical_cast.hpp boost/lexical_cast.hpp] header
|
||||
provides [@boost:doc/libs/release/libs/lexical_cast/ `lexical_cast<>`] general literal text conversions, such as an `int` represented as a `string`, or vice-versa.
|
||||
|
||||
[endsect]
|
||||
|
||||
@@ -153,10 +150,10 @@ This includes C++ built-in pointers, `std::shared_ptr`,
|
||||
class Banana : public Fruit {};
|
||||
|
||||
// Use one of these:
|
||||
typedef Fruit* FruitPtr;
|
||||
typedef std::shared_ptr<Fruit> FruitPtr;
|
||||
typedef boost::shared_ptr<Fruit> FruitPtr;
|
||||
typedef boost::intrusive_ptr<Fruit> FruitPtr;
|
||||
using FruitPtr = Fruit*;
|
||||
using FruitPtr = std::shared_ptr<Fruit>;
|
||||
using FruitPtr = boost::shared_ptr<Fruit>;
|
||||
using FruitPtr = boost::intrusive_ptr<Fruit>;
|
||||
|
||||
void f(FruitPtr fruit) {
|
||||
// ... logic which leads us to believe it is a banana
|
||||
@@ -176,17 +173,17 @@ This includes C++ built-in pointers, `std::shared_ptr`,
|
||||
// Throws: std::bad_cast if ( dynamic_cast<Derived>(x) == 0 )
|
||||
// Returns: dynamic_cast<Derived>(x)
|
||||
template <class Derived, class Base>
|
||||
inline Derived polymorphic_cast(Base* x);
|
||||
constexpr Derived polymorphic_cast(Base* x);
|
||||
|
||||
// Effects: assert( dynamic_cast<Derived>(x) == x );
|
||||
// Returns: static_cast<Derived>(x)
|
||||
template <class Derived, class Base>
|
||||
inline Derived polymorphic_downcast(Base* x);
|
||||
constexpr Derived polymorphic_downcast(Base* x);
|
||||
|
||||
// Effects: assert( dynamic_cast<Derived>(&x) == &x );
|
||||
// Returns: static_cast<Derived>(x)
|
||||
template <class Derived, class Base>
|
||||
inline Derived polymorphic_downcast(Base& x);
|
||||
constexpr Derived polymorphic_downcast(Base& x);
|
||||
|
||||
// Throws: std::bad_cast if ( dynamic_pointer_cast<Derived>(x) == 0 )
|
||||
// Returns: dynamic_pointer_cast<Derived>(x)
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace detail {
|
||||
|
||||
template<class T> struct icast_identity
|
||||
{
|
||||
typedef T type;
|
||||
using type = T;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// 08 Nov 14 Add polymorphic_pointer_downcast (Boris Rasin)
|
||||
// 09 Jun 14 "cast.hpp" was renamed to "polymorphic_cast.hpp" and
|
||||
// inclusion of numeric_cast was removed (Antony Polukhin)
|
||||
// 23 Jun 05 numeric_cast removed and redirected to the new verion (Fernando Cacciola)
|
||||
// 23 Jun 05 numeric_cast removed and redirected to the new version (Fernando Cacciola)
|
||||
// 02 Apr 01 Removed BOOST_NO_LIMITS workarounds and included
|
||||
// <boost/limits.hpp> instead (the workaround did not
|
||||
// actually compile when BOOST_NO_LIMITS was defined in
|
||||
@@ -31,7 +31,7 @@
|
||||
// 19 Oct 00 Fix numeric_cast for floating-point types (Dave Abrahams)
|
||||
// 15 Jul 00 Suppress numeric_cast warnings for GCC, Borland and MSVC
|
||||
// (Dave Abrahams)
|
||||
// 30 Jun 00 More MSVC6 wordarounds. See comments below. (Dave Abrahams)
|
||||
// 30 Jun 00 More MSVC6 workarounds. See comments below. (Dave Abrahams)
|
||||
// 28 Jun 00 Removed implicit_cast<>. See comment below. (Beman Dawes)
|
||||
// 27 Jun 00 More MSVC6 workarounds
|
||||
// 15 Jun 00 Add workarounds for MSVC6
|
||||
@@ -62,6 +62,12 @@
|
||||
# include <typeinfo>
|
||||
# include <type_traits>
|
||||
|
||||
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201907L
|
||||
#define BOOST_CONVERSION_IMPL_CONSTEXPR_DYN_CAST constexpr
|
||||
#else
|
||||
#define BOOST_CONVERSION_IMPL_CONSTEXPR_DYN_CAST inline
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
// See the documentation for descriptions of how to choose between
|
||||
@@ -74,7 +80,7 @@ namespace boost
|
||||
// section 15.8 exercise 1, page 425.
|
||||
|
||||
template <class Target, class Source>
|
||||
inline Target polymorphic_cast(Source* x)
|
||||
BOOST_CONVERSION_IMPL_CONSTEXPR_DYN_CAST Target polymorphic_cast(Source* x)
|
||||
{
|
||||
Target tmp = dynamic_cast<Target>(x);
|
||||
if ( tmp == 0 ) boost::throw_exception( std::bad_cast() );
|
||||
@@ -93,7 +99,7 @@ namespace boost
|
||||
// Contributed by Dave Abrahams
|
||||
|
||||
template <class Target, class Source>
|
||||
inline Target polymorphic_downcast(Source* x)
|
||||
BOOST_CONVERSION_IMPL_CONSTEXPR_DYN_CAST Target polymorphic_downcast(Source* x)
|
||||
{
|
||||
BOOST_ASSERT( dynamic_cast<Target>(x) == x ); // detect logic error
|
||||
return static_cast<Target>(x);
|
||||
@@ -109,11 +115,11 @@ namespace boost
|
||||
// Contributed by Julien Delacroix
|
||||
|
||||
template <class Target, class Source>
|
||||
inline typename std::enable_if<
|
||||
BOOST_CONVERSION_IMPL_CONSTEXPR_DYN_CAST typename std::enable_if<
|
||||
std::is_reference<Target>::value, Target
|
||||
>::type polymorphic_downcast(Source& x)
|
||||
{
|
||||
typedef typename std::remove_reference<Target>::type* target_pointer_type;
|
||||
using target_pointer_type = typename std::remove_reference<Target>::type*;
|
||||
return *boost::polymorphic_downcast<target_pointer_type>(
|
||||
std::addressof(x)
|
||||
);
|
||||
@@ -121,4 +127,6 @@ namespace boost
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#undef BOOST_CONVERSION_IMPL_CONSTEXPR_DYN_CAST
|
||||
|
||||
#endif // BOOST_POLYMORPHIC_CAST_HPP
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// boost polymorphic_pointer_cast.hpp header file ----------------------------------------------//
|
||||
// (C) Copyright Boris Rasin, 2014-2021.
|
||||
// (C) Copyright Antony Polukhin, 2014-2023.
|
||||
// (C) Copyright Antony Polukhin, 2014-2026.
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2016 Mikhail Maximov
|
||||
vigorous.activity at gmail dot com
|
||||
|
||||
Copyright (c) Antony Polukhin, 2021-2023
|
||||
Copyright (c) Antony Polukhin, 2021-2026
|
||||
|
||||
Distributed under the Boost Software License,
|
||||
Version 1.0. (See accompanying file LICENSE_1_0.txt
|
||||
@@ -33,7 +33,7 @@ boost-no-inspect
|
||||
<a href="../../doc/html/conversion.html">../../doc/html/conversion.html</a>
|
||||
</p>
|
||||
<p>
|
||||
© Antony Polukhin, 2014-2023
|
||||
© Antony Polukhin, 2014-2024
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2016-2026 Antony Polukhin
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
include(BoostTest OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
|
||||
|
||||
if(NOT HAVE_BOOST_TEST)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(BOOST_TEST_LINK_LIBRARIES Boost::conversion Boost::core)
|
||||
|
||||
boost_test(TYPE run SOURCES cast_test.cpp)
|
||||
boost_test(TYPE run SOURCES implicit_cast.cpp)
|
||||
boost_test(TYPE compile-fail SOURCES implicit_cast_fail.cpp)
|
||||
boost_test(TYPE compile-fail SOURCES implicit_cast_fail2.cpp)
|
||||
boost_test(TYPE run SOURCES polymorphic_cast_test.cpp LINK_LIBRARIES Boost::smart_ptr)
|
||||
+7
-5
@@ -1,18 +1,20 @@
|
||||
# Copyright (C) 2001-2003 Douglas Gregor
|
||||
# Copyright (C) Antony Polukhin, 2011-2023
|
||||
# Copyright (C) Antony Polukhin, 2011-2024
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
|
||||
require-b2 5.0.1 ;
|
||||
import-search /boost/config/checks ;
|
||||
import config : requires ;
|
||||
import testing ;
|
||||
import feature ;
|
||||
|
||||
import ../../config/checks/config : requires ;
|
||||
|
||||
project
|
||||
: requirements
|
||||
[ requires cxx11_rvalue_references ]
|
||||
<library>/boost/conversion//boost_conversion
|
||||
[ requires cxx11_decltype ]
|
||||
# default to all warnings on:
|
||||
<warnings>all
|
||||
# set warnings as errors for those compilers we know we get warning free:
|
||||
@@ -24,6 +26,6 @@ test-suite conversion
|
||||
: [ run implicit_cast.cpp ]
|
||||
[ compile-fail implicit_cast_fail.cpp ]
|
||||
[ run cast_test.cpp ]
|
||||
[ run polymorphic_cast_test.cpp ]
|
||||
[ run polymorphic_cast_test.cpp : : : <library>/boost/smart_ptr//boost_smart_ptr ]
|
||||
[ compile-fail implicit_cast_fail2.cpp ]
|
||||
;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
# Copyright Antony Polukhin, 2016-2023.
|
||||
# Copyright Antony Polukhin, 2016-2025.
|
||||
|
||||
#
|
||||
# See https://svn.boost.org/trac/boost/wiki/TravisCoverals for description of this file
|
||||
|
||||
@@ -38,6 +38,48 @@ namespace
|
||||
};
|
||||
}
|
||||
|
||||
constexpr bool compile_time_polymorphic_cast_check() {
|
||||
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201907L
|
||||
Derived derived;
|
||||
Base* base = &derived;
|
||||
return polymorphic_cast<Derived*>(base) != nullptr;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
static_assert(
|
||||
compile_time_polymorphic_cast_check(),
|
||||
"polymorphic_cast does not work at compile time"
|
||||
);
|
||||
|
||||
constexpr bool compile_time_polymorphic_downcast_check() {
|
||||
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201907L
|
||||
Derived derived;
|
||||
Base* base = &derived;
|
||||
return polymorphic_downcast<Derived*>(base) != nullptr;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
static_assert(
|
||||
compile_time_polymorphic_downcast_check(),
|
||||
"polymorphic_downcast does not work at compile time"
|
||||
);
|
||||
|
||||
constexpr bool compile_time_polymorphic_downcast2_check() {
|
||||
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201907L
|
||||
Derived derived;
|
||||
Base& base = derived;
|
||||
Derived& derived_again = polymorphic_downcast<Derived&>(base);
|
||||
(void)derived_again;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
static_assert(
|
||||
compile_time_polymorphic_downcast2_check(),
|
||||
"polymorphic_downcast does not work at compile time"
|
||||
);
|
||||
|
||||
int main( int argc, char * argv[] )
|
||||
{
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/implicit_cast.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/type.hpp>
|
||||
|
||||
using boost::implicit_cast;
|
||||
using boost::type;
|
||||
|
||||
@@ -18,8 +19,8 @@ struct foo
|
||||
operator long() const { return 0; }
|
||||
};
|
||||
|
||||
typedef type<long> long_type;
|
||||
typedef type<foo> foo_type;
|
||||
using long_type = type<long>;
|
||||
using foo_type = type<foo>;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user