diff --git a/doc/conversion.qbk b/doc/conversion.qbk index 6a7e27c..d2f543c 100644 --- a/doc/conversion.qbk +++ b/doc/conversion.qbk @@ -150,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 FruitPtr; - typedef boost::shared_ptr FruitPtr; - typedef boost::intrusive_ptr FruitPtr; + using FruitPtr = Fruit*; + using FruitPtr = std::shared_ptr; + using FruitPtr = boost::shared_ptr; + using FruitPtr = boost::intrusive_ptr; void f(FruitPtr fruit) { // ... logic which leads us to believe it is a banana diff --git a/include/boost/implicit_cast.hpp b/include/boost/implicit_cast.hpp index f0dd972..678195b 100644 --- a/include/boost/implicit_cast.hpp +++ b/include/boost/implicit_cast.hpp @@ -17,7 +17,7 @@ namespace detail { template struct icast_identity { - typedef T type; + using type = T; }; } // namespace detail diff --git a/include/boost/polymorphic_cast.hpp b/include/boost/polymorphic_cast.hpp index 818a0fe..dd9b194 100644 --- a/include/boost/polymorphic_cast.hpp +++ b/include/boost/polymorphic_cast.hpp @@ -113,7 +113,7 @@ namespace boost std::is_reference::value, Target >::type polymorphic_downcast(Source& x) { - typedef typename std::remove_reference::type* target_pointer_type; + using target_pointer_type = typename std::remove_reference::type*; return *boost::polymorphic_downcast( std::addressof(x) ); diff --git a/test/implicit_cast.cpp b/test/implicit_cast.cpp index 41edc5d..cf4cb94 100644 --- a/test/implicit_cast.cpp +++ b/test/implicit_cast.cpp @@ -18,8 +18,8 @@ struct foo operator long() const { return 0; } }; -typedef type long_type; -typedef type foo_type; +using long_type = type; +using foo_type = type; int main() {