diff --git a/CMakeLists.txt b/CMakeLists.txt index c3b08475..50258503 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,7 @@ else() endif() function(target_link_boost target) - target_link_libraries(${target} PUBLIC Boost::system Boost::filesystem) + target_link_libraries(${target} PUBLIC Boost::system) endfunction(target_link_boost) function(target_link_boost_test target) @@ -85,7 +85,7 @@ function(target_link_boost_test target) endfunction(target_link_boost_test) message("ASL_INFO: Using system boost.") -set(ASL_BOOST_COMPONENTS system filesystem unit_test_framework program_options) +set(ASL_BOOST_COMPONENTS system unit_test_framework program_options) find_package(Boost COMPONENTS ${ASL_BOOST_COMPONENTS} REQUIRED) add_subdirectory(source) diff --git a/adobe/adam.hpp b/adobe/adam.hpp index 62d08c5a..d183371e 100644 --- a/adobe/adam.hpp +++ b/adobe/adam.hpp @@ -13,20 +13,8 @@ #include #include -#include - -#ifdef __MWERKS__ -#pragma warn_unusedarg off -#pragma warn_unusedvar off -#endif - #include -#ifdef __MWERKS__ -#pragma warn_unusedarg reset -#pragma warn_unusedvar reset -#endif - #include #include #include @@ -68,10 +56,10 @@ class sheet_t : boost::noncopyable { public: struct relation_t; - typedef boost::function monitor_invariant_t; - typedef boost::function monitor_value_t; - typedef boost::function monitor_contributing_t; - typedef boost::function monitor_enabled_t; + using monitor_invariant_t = std::function; + using monitor_value_t = std::function; + using monitor_contributing_t = std::function; + using monitor_enabled_t = std::function; /*! diff --git a/adobe/adam_parser.hpp b/adobe/adam_parser.hpp index c97119fe..5288bace 100644 --- a/adobe/adam_parser.hpp +++ b/adobe/adam_parser.hpp @@ -10,12 +10,11 @@ #include +#include #include #include #include -#include - #include #include #include @@ -146,26 +145,23 @@ struct adam_callback_suite_t { std::string brief_m; }; - typedef boost::function - add_cell_proc_t; - - typedef boost::function - add_relation_proc_t; // REVISIT (sparent) where's brief? - - typedef boost::function - add_interface_proc_t; - - typedef boost::function - add_external_proc_t; + using add_cell_proc_t = std::function; + + using add_relation_proc_t = std::function; // REVISIT (sparent) where's brief? + + using add_interface_proc_t = std::function; + + using add_external_proc_t = std::function; add_cell_proc_t add_cell_proc_m; add_relation_proc_t add_relation_proc_m; diff --git a/adobe/algorithm/binary_search.hpp b/adobe/algorithm/binary_search.hpp index 3f0d70e4..2267d28b 100644 --- a/adobe/algorithm/binary_search.hpp +++ b/adobe/algorithm/binary_search.hpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -147,7 +148,7 @@ template // P models UnaryFunction(value_type(I)) -> T -inline typename boost::lazy_disable_if, boost::range_iterator>::type +inline typename boost::lazy_disable_if, boost::range_iterator>::type binary_search(I& r, const T& x, C c, P p) { return adobe::binary_search(boost::begin(r), boost::end(r), x, c, p); } @@ -158,7 +159,7 @@ template // P models UnaryFunction(value_type(I)) -> T -inline typename boost::lazy_disable_if, boost::range_const_iterator>::type +inline typename boost::lazy_disable_if, boost::range_const_iterator>::type binary_search(const I& r, const T& x, C c, P p) { return adobe::binary_search(boost::begin(r), boost::end(r), x, c, p); } diff --git a/adobe/algorithm/equal_range.hpp b/adobe/algorithm/equal_range.hpp index 5b891f93..a44789b0 100644 --- a/adobe/algorithm/equal_range.hpp +++ b/adobe/algorithm/equal_range.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -189,7 +190,7 @@ template // P models UnaryFunction(value_type(I)) -> T -inline typename boost::lazy_disable_if, implementation::lazy_range>::type +inline typename boost::lazy_disable_if, implementation::lazy_range>::type equal_range(I& r, const T& x, C c, P p) { return adobe::equal_range(boost::begin(r), boost::end(r), x, c, p); } @@ -205,7 +206,7 @@ template // P models UnaryFunction(value_type(I)) -> T inline - typename boost::lazy_disable_if, implementation::lazy_range_const>::type + typename boost::lazy_disable_if, implementation::lazy_range_const>::type equal_range(const I& r, const T& x, C c, P p) { return adobe::equal_range(boost::begin(r), boost::end(r), x, c, p); } @@ -246,7 +247,7 @@ equal_range(const I& r, const T& x) { template // C models StrictWeakOrdering(T, T) -inline typename boost::lazy_disable_if, implementation::lazy_range>::type +inline typename boost::lazy_disable_if, implementation::lazy_range>::type equal_range(I& r, const T& x, C c) { return adobe::equal_range(boost::begin(r), boost::end(r), x, c); } @@ -261,7 +262,7 @@ template // C models StrictWeakOrdering(T, T) inline - typename boost::lazy_disable_if, implementation::lazy_range_const>::type + typename boost::lazy_disable_if, implementation::lazy_range_const>::type equal_range(const I& r, const T& x, C c) { return adobe::equal_range(boost::begin(r), boost::end(r), x, c); } diff --git a/adobe/algorithm/lower_bound.hpp b/adobe/algorithm/lower_bound.hpp index 5a75e2c0..9987cc73 100644 --- a/adobe/algorithm/lower_bound.hpp +++ b/adobe/algorithm/lower_bound.hpp @@ -13,11 +13,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -148,7 +148,7 @@ template // P models UnaryFunction(value_type(I)) -> T -inline typename boost::lazy_disable_if, boost::range_iterator>::type +inline typename boost::lazy_disable_if, boost::range_iterator>::type lower_bound(I& r, const T& x, C c, P p) { return adobe::lower_bound(boost::begin(r), boost::end(r), x, c, p); } @@ -159,7 +159,7 @@ template // P models UnaryFunction(value_type(I)) -> T -inline typename boost::lazy_disable_if, boost::range_const_iterator>::type +inline typename boost::lazy_disable_if, boost::range_const_iterator>::type lower_bound(const I& r, const T& x, C c, P p) { return adobe::lower_bound(boost::begin(r), boost::end(r), x, c, p); } @@ -198,7 +198,7 @@ lower_bound(const ForwardRange& range, const T& value) { \brief lower_bound implementation */ template -inline typename boost::lazy_disable_if, boost::range_iterator>::type +inline typename boost::lazy_disable_if, boost::range_iterator>::type lower_bound(I& range, const T& value, Compare comp) { return adobe::lower_bound(boost::begin(range), boost::end(range), value, comp); } @@ -209,7 +209,7 @@ lower_bound(I& range, const T& value, Compare comp) { \brief lower_bound implementation */ template -inline typename boost::lazy_disable_if, boost::range_const_iterator>::type +inline typename boost::lazy_disable_if, boost::range_const_iterator>::type lower_bound(const I& range, const T& value, Compare comp) { return adobe::lower_bound(boost::begin(range), boost::end(range), value, comp); } diff --git a/adobe/algorithm/upper_bound.hpp b/adobe/algorithm/upper_bound.hpp index aaf16b02..cd0f10e2 100644 --- a/adobe/algorithm/upper_bound.hpp +++ b/adobe/algorithm/upper_bound.hpp @@ -14,11 +14,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -152,7 +152,7 @@ template // P models UnaryFunction(value_type(I)) -> T -inline typename boost::lazy_disable_if, boost::range_iterator>::type +inline typename boost::lazy_disable_if, boost::range_iterator>::type upper_bound(I& r, const T& x, C c, P p) { return adobe::upper_bound(boost::begin(r), boost::end(r), x, c, p); } @@ -163,7 +163,7 @@ template // P models UnaryFunction(value_type(I)) -> T -inline typename boost::lazy_disable_if, boost::range_const_iterator>::type +inline typename boost::lazy_disable_if, boost::range_const_iterator>::type upper_bound(const I& r, const T& x, C c, P p) { return adobe::upper_bound(boost::begin(r), boost::end(r), x, c, p); } @@ -202,7 +202,7 @@ upper_bound(const ForwardRange& range, const T& value) { \brief upper_bound implementation */ template -inline typename boost::lazy_disable_if, boost::range_iterator>::type +inline typename boost::lazy_disable_if, boost::range_iterator>::type upper_bound(I& range, const T& value, Compare comp) { return adobe::upper_bound(boost::begin(range), boost::end(range), value, comp); } @@ -213,7 +213,7 @@ upper_bound(I& range, const T& value, Compare comp) { \brief upper_bound implementation */ template -inline typename boost::lazy_disable_if, boost::range_const_iterator>::type +inline typename boost::lazy_disable_if, boost::range_const_iterator>::type upper_bound(const I& range, const T& value, Compare comp) { return adobe::upper_bound(boost::begin(range), boost::end(range), value, comp); } diff --git a/adobe/any_regular.hpp b/adobe/any_regular.hpp index 9bc28ef1..44ecf149 100644 --- a/adobe/any_regular.hpp +++ b/adobe/any_regular.hpp @@ -14,20 +14,14 @@ #include #include +#include #include #include #include #include #include -#include #include -#include -#include -#include -#include -#include -#include #include #include @@ -179,7 +173,7 @@ struct vtable_t { // Ensure that the vtable_t has a fixed layout regardless of alignment or packing. -BOOST_STATIC_ASSERT(sizeof(vtable_t) == 9 * sizeof(void*)); +static_assert(sizeof(vtable_t) == 9 * sizeof(void*)); /**************************************************************************************************/ @@ -188,7 +182,7 @@ union pad_vtable_t { double pad_m; // unused padding }; -BOOST_STATIC_ASSERT(sizeof(pad_vtable_t) == sizeof(double)); +static_assert(sizeof(pad_vtable_t) == sizeof(double)); /**************************************************************************************************/ @@ -261,7 +255,7 @@ struct any_regular_model_local : any_regular_interface_t, boost::noncopyable { T& get() { return object_m; } }; -BOOST_STATIC_ASSERT(sizeof(any_regular_model_local) == 16); +static_assert(sizeof(any_regular_model_local) == 16); template const vtable_t any_regular_model_local::vtable_s = { @@ -356,7 +350,7 @@ struct any_regular_model_remote : any_regular_interface_t, boost::noncopyable { T& get() { return object_ptr_m->data_m; } }; -BOOST_STATIC_ASSERT(sizeof(any_regular_model_remote) <= 16); +static_assert(sizeof(any_regular_model_remote) <= 16); template const vtable_t any_regular_model_remote::vtable_s = { @@ -461,10 +455,10 @@ class any_regular_t : boost::equality_comparable { typedef typename boost::mpl::if_::type model_type; - typedef typename boost::mpl::if_c::value, reference_type, + typedef typename boost::mpl::if_c::value, reference_type, T>::type result_type; - typedef typename boost::mpl::if_c::value, + typedef typename boost::mpl::if_c::value, const_reference_type, T>::type const_result_type; }; @@ -657,7 +651,7 @@ class any_regular_t : boost::equality_comparable { #ifndef ADOBE_NO_DOCUMENTATION -BOOST_STATIC_ASSERT((sizeof(any_regular_t) == 16)); +static_assert(sizeof(any_regular_t) == 16); inline bool operator==(const any_regular_t& x, const any_regular_t& y) { return (x.type_info() == y.type_info()) && x.object().equals(y.object()); @@ -770,11 +764,10 @@ struct runtime_cast_t { typedef typename boost::remove_const::type>::type result_type; - BOOST_STATIC_ASSERT((boost::is_reference::value)); + static_assert(boost::is_reference::value); /* There is no auto-promotion through the new interface. Soon promotion will be disabled. */ - BOOST_STATIC_ASSERT( - (boost::is_same::type, result_type>::value)); + static_assert(std::is_same::type, result_type>::value); return x.cast(); } @@ -787,11 +780,10 @@ struct runtime_cast_t { R operator()(any_regular_t& x) const { typedef typename boost::remove_reference::type result_type; - BOOST_STATIC_ASSERT((boost::is_reference::value)); + static_assert(boost::is_reference::value); /* There is no auto-promotion through the new interface. Soon promotion will be disabled. */ - BOOST_STATIC_ASSERT( - (boost::is_same::type, result_type>::value)); + static_assert(std::is_same::type, result_type>::value); return x.cast(); } @@ -804,11 +796,10 @@ struct runtime_cast_t { R operator()(any_regular_t* x) const { typedef typename boost::remove_pointer::type result_type; - BOOST_STATIC_ASSERT((boost::is_pointer::value)); + static_assert(boost::is_pointer::value); /* There is no auto-promotion through the new interface. Soon promotion will be disabled. */ - BOOST_STATIC_ASSERT( - (boost::is_same::type, result_type>::value)); + static_assert(std::is_same::type, result_type>::value); return x->ptr_cast(); } @@ -822,11 +813,10 @@ struct runtime_cast_t { typedef typename boost::remove_const::type>::type result_type; - BOOST_STATIC_ASSERT((boost::is_pointer::value)); + static_assert(boost::is_pointer::value); /* There is no auto-promotion through the new interface. Soon promotion will be disabled. */ - BOOST_STATIC_ASSERT( - (boost::is_same::type, result_type>::value)); + static_assert(std::is_same::type, result_type>::value); if (x->type_info() != typeid(result_type)) return 0; diff --git a/adobe/arg_stream.hpp b/adobe/arg_stream.hpp index a530a21d..9c1ac58b 100644 --- a/adobe/arg_stream.hpp +++ b/adobe/arg_stream.hpp @@ -24,21 +24,11 @@ #include #include -#include -#include -#include - #include #include // ADOBE_HAS_TYPE/ADOBE_HAS_MEMBER - -// forward declare boost::function so we can specialize against it -namespace boost { -template -class function; -} - +#include namespace adobe { @@ -199,17 +189,13 @@ R get_next_arg(ArgStream const* as) { \template_parameters F must model callable_object(?) */ - -// for some reason boost::function_types does not handle boost::functions, -// nor does boost::function have a function::signature typedef, -// so in order to support boost, we use this signature::type mechanism: template struct signature { typedef F type; }; -// specialize for boost::function +// specialize for std::function template -struct signature> { +struct signature> { typedef F type; }; diff --git a/adobe/closed_hash.hpp b/adobe/closed_hash.hpp index 57153932..3a1cceca 100644 --- a/adobe/closed_hash.hpp +++ b/adobe/closed_hash.hpp @@ -25,9 +25,7 @@ #include #include #include -#include #include -#include #include #include @@ -244,10 +242,10 @@ class closed_hash_set either equal to the sizeof a pointer or a lower power of two so this packs tightly. */ - BOOST_STATIC_ASSERT(!(sizeof(A) == sizeof(void*) || sizeof(A) == 0) || - (sizeof(compact_header_t) == - (sizeof(allocator_type) + 2 * sizeof(node_base_t) + - 2 * sizeof(std::size_t)))); + static_assert(!(sizeof(A) == sizeof(void*) || sizeof(A) == 0) || + (sizeof(compact_header_t) == + (sizeof(allocator_type) + 2 * sizeof(node_base_t) + + 2 * sizeof(std::size_t)))); aligned_storage header_m; node_t storage_m[1]; @@ -677,7 +675,7 @@ class closed_hash_map /**************************************************************************************************/ -BOOST_STATIC_ASSERT(sizeof(closed_hash_set) == sizeof(void*)); +static_assert(sizeof(closed_hash_set) == sizeof(void*)); #ifndef ADOBE_NO_DOCUMENTATION diff --git a/adobe/copy_on_write.hpp b/adobe/copy_on_write.hpp index 4bccaa18..84e2b6ab 100644 --- a/adobe/copy_on_write.hpp +++ b/adobe/copy_on_write.hpp @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -342,9 +341,9 @@ typename copy_on_write::implementation_t* copy_on_write::default_s; template struct copy_on_write::implementation_t : private boost::noncopyable { // Assert proper size for counter_t - BOOST_STATIC_ASSERT((sizeof(counter_t) == sizeof(std::size_t))); + static_assert(sizeof(counter_t) == sizeof(std::size_t)); // Assert proper alignment for counter_t - BOOST_STATIC_ASSERT((sizeof(counter_t) == sizeof(void*))); + static_assert(sizeof(counter_t) == sizeof(void*)); struct header_t { counter_t count_m; diff --git a/adobe/dancing_links.hpp b/adobe/dancing_links.hpp index 5e538d6b..7e3b3f87 100644 --- a/adobe/dancing_links.hpp +++ b/adobe/dancing_links.hpp @@ -18,7 +18,6 @@ #include #endif -#include #include #include diff --git a/adobe/dictionary_arg_stream.hpp b/adobe/dictionary_arg_stream.hpp index 264aabe0..c57f59d0 100644 --- a/adobe/dictionary_arg_stream.hpp +++ b/adobe/dictionary_arg_stream.hpp @@ -11,12 +11,12 @@ #include #include -#include #include #include #include #include +#include #include // std::nothrow_t namespace adobe { @@ -182,7 +182,7 @@ struct is_range_for_dictionary { }; static const int test = - is_range_for_dictionary>::value; + is_range_for_dictionary>::value; ADOBE_HAS_TYPE_IMPL(key_type); @@ -295,7 +295,7 @@ template typename arg_stream::result_type::type call_with_dictionary(F f, Dictionary const& dict, T1 const& key1, T2 const& key2) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2)}; + std::array arr = {key_type(key1), key_type(key2)}; return call_with_dictionary(f, dict, arr); } @@ -303,7 +303,7 @@ template typename arg_stream::result_type::type call_member_with_dictionary(X& x, F f, Dictionary const& dict, T1 const& key1, T2 const& key2) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2)}; + std::array arr = {key_type(key1), key_type(key2)}; return call_member_with_dictionary(x, f, dict, arr); } @@ -311,7 +311,7 @@ template typename arg_stream::result_type::type call_with_dictionary(F f, std::nothrow_t, Dictionary const& dict, T1 const& key1, T2 const& key2) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2)}; + std::array arr = {key_type(key1), key_type(key2)}; return call_with_dictionary(f, std::nothrow, dict, arr); } @@ -320,7 +320,7 @@ typename arg_stream::result_type::type call_member_with_dictionary(X x, F f, std::nothrow_t, Dictionary const& dict, T1 const& key1, T2 const& key2) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2)}; + std::array arr = {key_type(key1), key_type(key2)}; return call_member_with_dictionary(x, f, std::nothrow, dict, arr); } @@ -329,7 +329,7 @@ template ::type call_with_dictionary(F f, Dictionary const& dict, T1 const& key1, T2 const& key2, T3 const& key3) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2), key_type(key3)}; + std::array arr = {key_type(key1), key_type(key2), key_type(key3)}; return call_with_dictionary(f, dict, arr); } @@ -338,7 +338,7 @@ typename arg_stream::result_type::type call_member_with_dictionary(X& x, F f, Dictionary const& dict, T1 const& key1, T2 const& key2, T3 const& key3) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2), key_type(key3)}; + std::array arr = {key_type(key1), key_type(key2), key_type(key3)}; return call_member_with_dictionary(x, f, dict, arr); } @@ -347,7 +347,7 @@ typename arg_stream::result_type::type call_with_dictionary(F f, std::nothrow_t, Dictionary const& dict, T1 const& key1, T2 const& key2, T3 const& key3) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2), key_type(key3)}; + std::array arr = {key_type(key1), key_type(key2), key_type(key3)}; return call_with_dictionary(f, std::nothrow, dict, arr); } @@ -356,7 +356,7 @@ typename arg_stream::result_type::type call_member_with_dictionary(X x, F f, std::nothrow_t, Dictionary const& dict, T1 const& key1, T2 const& key2, T3 const& key3) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2), key_type(key3)}; + std::array arr = {key_type(key1), key_type(key2), key_type(key3)}; return call_member_with_dictionary(x, f, std::nothrow, dict, arr); } @@ -366,8 +366,7 @@ typename arg_stream::result_type::type call_with_dictionary(F f, Dictionary c T1 const& key1, T2 const& key2, T3 const& key3, T4 const& key4) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2), key_type(key3), - key_type(key4)}; + std::array arr = {key_type(key1), key_type(key2), key_type(key3), key_type(key4)}; return call_with_dictionary(f, dict, arr); } @@ -377,8 +376,7 @@ typename arg_stream::result_type::type call_member_with_dictionary(X& x, F f, Dictionary const& dict, T1 const& key1, T2 const& key2, T3 const& key3, T4 const& key4) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2), key_type(key3), - key_type(key4)}; + std::array arr = {key_type(key1), key_type(key2), key_type(key3), key_type(key4)}; return call_member_with_dictionary(x, f, dict, arr); } @@ -387,8 +385,7 @@ typename arg_stream::result_type::type call_with_dictionary(F f, std::nothrow_t, Dictionary const& dict, T1 const& key1, T2 const& key2, T3 const& key3, T4 const& key4) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2), key_type(key3), - key_type(key4)}; + std::array arr = {key_type(key1), key_type(key2), key_type(key3), key_type(key4)}; return call_with_dictionary(f, std::nothrow, dict, arr); } @@ -398,8 +395,7 @@ typename arg_stream::result_type::type call_member_with_dictionary(X x, F f, std::nothrow_t, Dictionary const& dict, T1 const& key1, T2 const& key2, T3 const& key3, T4 const& key4) { typedef typename dictionary_arg_stream_detail::key_type::type key_type; - boost::array arr = {key_type(key1), key_type(key2), key_type(key3), - key_type(key4)}; + std::array arr = {key_type(key1), key_type(key2), key_type(key3), key_type(key4)}; return call_member_with_dictionary(x, f, std::nothrow, dict, arr); } diff --git a/adobe/eve_evaluate.hpp b/adobe/eve_evaluate.hpp index bc8579af..4bd3e063 100644 --- a/adobe/eve_evaluate.hpp +++ b/adobe/eve_evaluate.hpp @@ -10,8 +10,6 @@ #include -#include - #include #include @@ -20,15 +18,16 @@ #include #include +#include + /**************************************************************************************************/ namespace adobe { /**************************************************************************************************/ -typedef boost::function - bind_layout_proc_t; +using bind_layout_proc_t = std::function; eve_callback_suite_t bind_layout(const bind_layout_proc_t& proc, sheet_t& layout_sheet, virtual_machine_t& evaluator); diff --git a/adobe/eve_parser.hpp b/adobe/eve_parser.hpp index 8de577ba..aec82b88 100644 --- a/adobe/eve_parser.hpp +++ b/adobe/eve_parser.hpp @@ -10,12 +10,11 @@ #include +#include +#include #include #include -#include -#include - #include #include #include @@ -164,31 +163,26 @@ struct eve_callback_suite_t { std::string brief_m; }; - typedef boost::any position_t; + using position_t = std::any; - typedef boost::function - add_view_proc_t; - - typedef boost::function - add_cell_proc_t; + const array_t& parameters, const std::string& brief, const std::string& detailed)>; - typedef boost::function - add_relation_proc_t; + using add_cell_proc_t = std::function; - typedef boost::function - add_interface_proc_t; + using add_relation_proc_t = std::function; - typedef boost::function finalize_sheet_proc_t; + using add_interface_proc_t = std::function; + using finalize_sheet_proc_t = std::function; add_view_proc_t add_view_proc_m; add_cell_proc_t add_cell_proc_m; diff --git a/adobe/extents.hpp b/adobe/extents.hpp index 77019cec..57a1e62d 100644 --- a/adobe/extents.hpp +++ b/adobe/extents.hpp @@ -10,9 +10,9 @@ #include -#include #include +#include #include /**************************************************************************************************/ @@ -81,7 +81,7 @@ struct extents_t : friend bool operator==(const slice_t& x, const slice_t& y); }; - boost::array slice_m; + std::array slice_m; slice_t& vertical() { return slice_m[extents_slices_t::vertical]; } slice_t& horizontal() { return slice_m[extents_slices_t::horizontal]; } diff --git a/adobe/external_model.hpp b/adobe/external_model.hpp index 3ee47666..7f29af9e 100644 --- a/adobe/external_model.hpp +++ b/adobe/external_model.hpp @@ -11,9 +11,9 @@ #include #include +#include #include -#include #include #include @@ -35,8 +35,8 @@ namespace adobe { */ class external_model_t : boost::noncopyable { public: - typedef boost::signals2::connection connection_t; - typedef boost::function monitor_t; + using connection_t = boost::signals2::connection; + using monitor_t = std::function; void add_cell(name_t); diff --git a/adobe/fnv.hpp b/adobe/fnv.hpp index f3f9ea67..3924274a 100644 --- a/adobe/fnv.hpp +++ b/adobe/fnv.hpp @@ -12,6 +12,7 @@ /**************************************************************************************************/ #include +#include #ifndef ADOBE_FNV_NO_BIGINTS #include diff --git a/adobe/function.hpp b/adobe/function.hpp index be6b9539..86c536ae 100644 --- a/adobe/function.hpp +++ b/adobe/function.hpp @@ -10,9 +10,8 @@ #include #include - -#include -#include +#include +#include #include @@ -136,18 +135,18 @@ typename F::concept_t* make_model(const T& x) { } template -typename F::concept_t* create_model(const T& x, std::tr1::true_type) { +typename F::concept_t* create_model(const T& x, std::true_type) { return x ? make_model(boost::bind(x)) : 0; } template -typename F::concept_t* create_model(const T& x, std::tr1::false_type) { +typename F::concept_t* create_model(const T& x, std::false_type) { return make_model(boost::bind(x)); } template typename F::concept_t* create_model(const T& x) { - return create_model(x, std::tr1::is_pointer()); + return create_model(x, std::is_pointer()); } } // namespace implementation @@ -223,7 +222,7 @@ class function : public implementation::function_base> { // [3.7.2.4] function invocation R operator()() const { if (!object_m) - throw std::tr1::bad_function_call(); + throw std::bad_function_call(); return object_m->apply(); } @@ -245,16 +244,16 @@ class function : public implementation::function_base> { typedef implementation::concept_base_t base_type; explicit concept_t(const vtable_type* x) : base_type(x) {} - R apply() { return apply(typename std::tr1::is_void()); } + R apply() { return apply(typename std::is_void()); } - void apply(std::tr1::true_type) { + void apply(std::true_type) { string_t message; this->vtable_m->apply(this, message); if (message) throw marshaled_exception(move(message)); } - R apply(std::tr1::false_type) { + R apply(std::false_type) { string_t message; R result = this->vtable_m->apply(this, message); if (message) @@ -270,10 +269,10 @@ class function : public implementation::function_base> { explicit model(T x) : base_type(&vtable_s), function_m(x) {} static R apply(concept_t* x, string_t& message) { - return apply(x, message, typename std::tr1::is_void()); + return apply(x, message, typename std::is_void()); } - static void apply(concept_t* x, string_t& message, std::tr1::true_type) { + static void apply(concept_t* x, string_t& message, std::true_type) { try { static_cast(x)->function_m(); } catch (...) { @@ -281,7 +280,7 @@ class function : public implementation::function_base> { } } - static R apply(concept_t* x, string_t& message, std::tr1::false_type) { + static R apply(concept_t* x, string_t& message, std::false_type) { R result; try { result = static_cast(x)->function_m(); diff --git a/adobe/implementation/atomic_primitives.hpp b/adobe/implementation/atomic_primitives.hpp index e079c85d..39a282f9 100644 --- a/adobe/implementation/atomic_primitives.hpp +++ b/adobe/implementation/atomic_primitives.hpp @@ -18,7 +18,6 @@ #endif #include -#include /******************************************************************************/ @@ -49,7 +48,7 @@ std::ostream& operator<<(std::ostream& s, const typename atomic::type& x) { typedef adobe::implementation::atomic atomic_t; -BOOST_STATIC_ASSERT((sizeof(atomic_t::type) == sizeof(atomic_t::value_type))); +static_assert(sizeof(atomic_t::type) == sizeof(atomic_t::value_type)); /******************************************************************************/ diff --git a/adobe/implementation/lex_shared.hpp b/adobe/implementation/lex_shared.hpp index b0565297..ccd299a0 100644 --- a/adobe/implementation/lex_shared.hpp +++ b/adobe/implementation/lex_shared.hpp @@ -19,12 +19,11 @@ #include #include +#include #include +#include #include -#include -#include - /**************************************************************************************************/ #ifdef BOOST_MSVC @@ -45,9 +44,9 @@ namespace adobe { template // E models Enumeration struct lex_base_t { public: - typedef std::istream::pos_type pos_type; - typedef boost::function parse_token_proc_t; - typedef lex_token_t token_type; + using pos_type = std::istream::pos_type; + using parse_token_proc_t = std::function; + using token_type = lex_token_t; lex_base_t(uchar_ptr_t first, uchar_ptr_t last, const line_position_t& position); @@ -110,8 +109,8 @@ struct lex_base_t { line_position_t line_position_m; parse_token_proc_t parse_proc_m; bool skip_white_m; - boost::array putback_m; // stack-based is faster - std::size_t index_m; // for putback_m + std::array putback_m; // stack-based is faster + std::size_t index_m; // for putback_m #if !defined(ADOBE_NO_DOCUMENTATION) circular_queue last_token_m; // N token lookahead @@ -291,8 +290,8 @@ struct lex_fragment_t { template // I models InputIterator struct stream_lex_base_t { public: - typedef std::istream::pos_type pos_type; - typedef boost::function parse_token_proc_t; + using pos_type = std::istream::pos_type; + using parse_token_proc_t = std::function; stream_lex_base_t(I first, I last, const line_position_t& position); @@ -329,8 +328,8 @@ struct stream_lex_base_t { line_position_t line_position_m; parse_token_proc_t parse_proc_m; bool skip_white_m; - boost::array putback_m; // stack-based is faster - std::size_t index_m; // for putback_m + std::array putback_m; // stack-based is faster + std::size_t index_m; // for putback_m #if !defined(ADOBE_NO_DOCUMENTATION) circular_queue last_token_m; // N token lookahead diff --git a/adobe/implementation/lex_shared_fwd.hpp b/adobe/implementation/lex_shared_fwd.hpp index a30c52a3..eae03f8d 100644 --- a/adobe/implementation/lex_shared_fwd.hpp +++ b/adobe/implementation/lex_shared_fwd.hpp @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -242,7 +241,7 @@ warranties as to string ownership. template inline token_range_t static_token_range(T* begin) { - BOOST_STATIC_ASSERT(sizeof(T) == sizeof(unsigned char)); + static_assert(sizeof(T) == sizeof(unsigned char)); T* end(begin); diff --git a/adobe/implementation/lex_stream_fwd.hpp b/adobe/implementation/lex_stream_fwd.hpp index 03d2d7af..9a204cd3 100644 --- a/adobe/implementation/lex_stream_fwd.hpp +++ b/adobe/implementation/lex_stream_fwd.hpp @@ -12,17 +12,9 @@ #include -#ifdef __MWERKS__ -#pragma warn_implicitconv off -#endif - #include -#ifdef __MWERKS__ -#pragma warn_implicitconv reset -#endif - -#include +#include /**************************************************************************************************/ @@ -31,7 +23,7 @@ namespace adobe { /**************************************************************************************************/ typedef bool(keyword_extension_lookup_proc_signature_t)(const name_t&); -typedef boost::function keyword_extension_lookup_proc_t; +using keyword_extension_lookup_proc_t = std::function; /**************************************************************************************************/ diff --git a/adobe/implementation/toroid.hpp b/adobe/implementation/toroid.hpp index 14a50176..69c93501 100644 --- a/adobe/implementation/toroid.hpp +++ b/adobe/implementation/toroid.hpp @@ -12,9 +12,10 @@ #include -#include #include +#include +#include #include /**************************************************************************************************/ @@ -51,7 +52,7 @@ class byte_toroid_t : boost::noncopyable { private: enum { block_size_k = 512 }; - typedef boost::array node_block_t; + typedef std::array node_block_t; typedef std::list data_set_t; typedef std::vector row_header_set_t; typedef std::vector col_header_set_t; diff --git a/adobe/implementation/zuid_uuid.hpp b/adobe/implementation/zuid_uuid.hpp index 3ab4d83f..a217609c 100644 --- a/adobe/implementation/zuid_uuid.hpp +++ b/adobe/implementation/zuid_uuid.hpp @@ -13,8 +13,6 @@ #include -#include - /**************************************************************************************************/ /* @@ -56,15 +54,15 @@ namespace adobe { #endif /* uuid_create -- generate a UUID */ -boost::int16_t uuid_create(uuid_t* uuid); +std::int16_t uuid_create(uuid_t* uuid); /* uuid_create_from_name -- create a UUID using a "name" from a "name space" */ void uuid_create_from_name(uuid_t* uuid, /* resulting UUID */ uuid_t nsid, /* UUID to serve as context, so identical names from different name spaces generate different UUIDs */ - boost::uint8_t* name, /* the name from which to generate a UUID */ - boost::uint16_t namelen); /* the length of the name */ + std::uint8_t* name, /* the name from which to generate a UUID */ + std::uint16_t namelen); /* the length of the name */ /* uuid_compare -- Compare two UUID's "lexically" and return @@ -74,7 +72,7 @@ uuid_compare -- Compare two UUID's "lexically" and return Note: lexical ordering is not temporal ordering! */ -boost::int16_t uuid_compare(const uuid_t* u1, const uuid_t* u2); +std::int16_t uuid_compare(const uuid_t* u1, const uuid_t* u2); /**************************************************************************************************/ diff --git a/adobe/layout_attributes.hpp b/adobe/layout_attributes.hpp index 9897203e..1684f12a 100644 --- a/adobe/layout_attributes.hpp +++ b/adobe/layout_attributes.hpp @@ -11,6 +11,8 @@ #include #include +#include + /*! \defgroup layout_attributes Layout Attributes \ingroup layout_library @@ -86,7 +88,7 @@ struct layout_attributes_t int indent_m; bool create_m; spacing_t spacing_m; - boost::array slice_m; + std::array slice_m; // containers only placement_t placement_m; @@ -126,7 +128,7 @@ struct place_data_t guide_set_t guide_set_m; }; - boost::array slice_m; + std::array slice_m; slice_t& vertical() { return slice_m[extents_slices_t::vertical]; } slice_t& horizontal() { return slice_m[extents_slices_t::horizontal]; } diff --git a/adobe/localization.hpp b/adobe/localization.hpp index 3c2b22a1..e590cb4f 100644 --- a/adobe/localization.hpp +++ b/adobe/localization.hpp @@ -12,7 +12,8 @@ #include -#include +#include +#include /**************************************************************************************************/ @@ -30,7 +31,7 @@ namespace adobe { The proc used here can expect utf-8 coming in and should output utf-8 encoded text in kind. */ -typedef boost::function localization_lookup_proc_t; +using localization_lookup_proc_t = std::function; void localization_register(const localization_lookup_proc_t& proc); diff --git a/adobe/memory.hpp b/adobe/memory.hpp index 86221a52..8ce11cb3 100644 --- a/adobe/memory.hpp +++ b/adobe/memory.hpp @@ -539,7 +539,7 @@ struct aligned_storage { const void* storage() const { return &data_m; } storage_t data_m; - BOOST_STATIC_ASSERT(sizeof(T) <= sizeof(storage_t)); + static_assert(sizeof(T) <= sizeof(storage_t)); }; //! @} //end addtogroup memory diff --git a/adobe/numeric.hpp b/adobe/numeric.hpp index 61a1e3a3..aa8ab7da 100644 --- a/adobe/numeric.hpp +++ b/adobe/numeric.hpp @@ -14,17 +14,8 @@ #include #include -// REVISIT (sparent): dissable warnings for unused arguments in boost 1.32.0 -#if defined(__MWERKS__) -#pragma warn_unusedarg off -#endif - #include -#if defined(__MWERKS__) -#pragma warn_unusedarg reset -#endif - namespace adobe { /*! \defgroup numeric Numeric Algorithms diff --git a/adobe/poly.hpp b/adobe/poly.hpp index 6ce6517b..81ee8024 100644 --- a/adobe/poly.hpp +++ b/adobe/poly.hpp @@ -15,13 +15,13 @@ #include #include #include -#include -#include #include #include #include +#include + /**************************************************************************************************/ namespace adobe { @@ -46,7 +46,7 @@ namespace adobe { template struct is_base_derived_or_same - : boost::mpl::or_, boost::is_base_of, boost::is_same> {}; + : boost::mpl::or_, boost::is_base_of, std::is_same> {}; #endif // !defined(ADOBE_NO_DOCUMENTATION) @@ -169,7 +169,7 @@ template struct is_small { enum { value = sizeof(T) <= N && (boost::has_nothrow_constructor::value || - boost::is_same::value) + std::is_same::value) }; }; diff --git a/adobe/static_table.hpp b/adobe/static_table.hpp index e8b18573..61d3fd19 100644 --- a/adobe/static_table.hpp +++ b/adobe/static_table.hpp @@ -12,6 +12,7 @@ #include +#include #include #include @@ -41,7 +42,7 @@ sorted will have undefined results. \example \code - typdef adobe::static_table, 4> table_t; + using table_t = adobe::static_table, 4>; static table_t some_table_s = {{ diff --git a/adobe/table_index.hpp b/adobe/table_index.hpp index a109c92b..241ea8ac 100644 --- a/adobe/table_index.hpp +++ b/adobe/table_index.hpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/adobe/task.hpp b/adobe/task.hpp index 7e42bbce..6e816c61 100644 --- a/adobe/task.hpp +++ b/adobe/task.hpp @@ -320,51 +320,6 @@ inline void run_with_cancellation_token(const F& f, cancellation_token token) { /**************************************************************************************************/ -namespace details { - -/* - REVISIT (sparent) : Simple optional - could use Boost but don't want to add the depenency. -*/ - -template -class optional { -public: - optional() : initialized_(false) {} - - optional& operator=(T&& x) { - if (initialized_) - get() = std::forward(x); - else - new (&storage_) T(std::forward(x)); - initialized_ = true; - return *this; - } - - T& get() { - assert(initialized_ && "getting unset optional."); - return *static_cast(static_cast(&storage_)); - } - - explicit operator bool() const { return initialized_; } - - ~optional() { - if (initialized_) - get().~T(); - } - -private: - optional(const optional&); - optional operator=(const optional&); - - typename std::aligned_storage::value>::type storage_; - - bool initialized_; -}; - -} // namespace details - -/**************************************************************************************************/ - /*! A function object that will execute f with the given cancellation_token in a @@ -384,7 +339,7 @@ class cancelable_function { : function_(std::move(f)), token_(std::move(token)) {} R operator()(Arg&&... arg) const { - details::optional r; + std::optional r; run_with_cancellation_token([&] { r = function_(std::forward(arg)...); }, token_); diff --git a/adobe/timer.hpp b/adobe/timer.hpp index 4920e998..1aa0e17f 100644 --- a/adobe/timer.hpp +++ b/adobe/timer.hpp @@ -106,13 +106,10 @@ ones used above. #undef WINDOWS_LEAN_AND_MEAN #undef ADOBE_UNDEFINE_WINDOWS_LEAN_AND_MEAN #endif -#elif defined(BOOST_HAS_THREADS) -#include -#elif defined(BOOST_HAS_GETTIMEOFDAY) -#include #endif #include +#include #include #include @@ -123,13 +120,7 @@ namespace adobe { /**************************************************************************************************/ class timer_t : boost::totally_ordered { -#if ADOBE_PLATFORM_WIN - typedef LARGE_INTEGER value_type; -#elif defined(BOOST_HAS_THREADS) - typedef boost::xtime value_type; -#elif defined(BOOST_HAS_GETTIMEOFDAY) - typedef timeval value_type; -#endif + using value_type = std::chrono::time_point; typedef std::vector accumulator_type; @@ -139,19 +130,11 @@ class timer_t : boost::totally_ordered { #ifndef ADOBE_NO_DOCUMENTATION timer_t() { -#if ADOBE_PLATFORM_WIN - (void)::QueryPerformanceFrequency(&frequency_m); -#endif - reset(); } timer_t(const timer_t& rhs) : epoch_m(rhs.epoch_m), split_m(rhs.split_m), time_set_m(rhs.time_set_m) -#if ADOBE_PLATFORM_WIN - , - frequency_m(rhs.frequency_m) -#endif { } @@ -160,10 +143,6 @@ class timer_t : boost::totally_ordered { split_m = rhs.split_m; time_set_m = rhs.time_set_m; -#if ADOBE_PLATFORM_WIN - frequency_m = rhs.frequency_m; -#endif - return *this; } @@ -173,14 +152,8 @@ class timer_t : boost::totally_ordered { Resets the epoch of the timer to now */ - inline void reset() { -#if ADOBE_PLATFORM_WIN - (void)::QueryPerformanceCounter(&epoch_m); -#elif defined(BOOST_HAS_THREADS) - boost::xtime_get(&epoch_m, boost::TIME_UTC_); -#elif defined(BOOST_HAS_GETTIMEOFDAY) - gettimeofday(&epoch_m, static_cast(0)); -#endif + inline void reset() { + epoch_m = std::chrono::high_resolution_clock::now(); } /*! @@ -195,21 +168,9 @@ class timer_t : boost::totally_ordered { */ inline double split() { -#if ADOBE_PLATFORM_WIN - (void)::QueryPerformanceCounter(&split_m); - return (split_m.QuadPart - epoch_m.QuadPart) / static_cast(frequency_m.QuadPart) * - double(1e3); -#elif defined(BOOST_HAS_THREADS) - boost::xtime_get(&split_m, boost::TIME_UTC_); - return ((split_m.sec - epoch_m.sec) * double(1e3) + - (split_m.nsec - epoch_m.nsec) / double(1e6)); -#elif defined(BOOST_HAS_GETTIMEOFDAY) - gettimeofday(&split_m, static_cast(0)); - return ((split_m.tv_sec - epoch_m.tv_sec) * double(1e3) + - (split_m.tv_usec - epoch_m.tv_usec) / double(1e3)); -#else - return -1; -#endif + const std::chrono::duration delta{ + std::chrono::high_resolution_clock::now() - epoch_m}; + return delta.count(); } /*! @@ -306,9 +267,6 @@ class timer_t : boost::totally_ordered { value_type epoch_m; value_type split_m; mutable accumulator_type time_set_m; -#if ADOBE_PLATFORM_WIN - value_type frequency_m; -#endif }; /**************************************************************************************************/ diff --git a/adobe/vector.hpp b/adobe/vector.hpp index 17420c47..234b44c1 100644 --- a/adobe/vector.hpp +++ b/adobe/vector.hpp @@ -22,10 +22,7 @@ #include #include -#include #include -#include -#include #include #include @@ -288,7 +285,7 @@ class vector : boost::totally_ordered, vector> { friend inline bool operator==(const vector& x, const vector& y) { #if defined(_MSC_VER) && _MSC_VER == 1600 && _ITERATOR_DEBUG_LEVEL != 0 return (x.size() == y.size()) && - std::_Equal1(x.begin(), x.end(), y.begin(), std::tr1::false_type()); + std::_Equal1(x.begin(), x.end(), y.begin(), std::false_type()); #else return (x.size() == y.size()) && std::equal(x.begin(), x.end(), y.begin()); #endif @@ -523,7 +520,7 @@ std::ostream& operator<<(std::ostream& out, const vector& x) { /**************************************************************************************************/ -BOOST_STATIC_ASSERT(sizeof(vector) == sizeof(void*)); +static_assert(sizeof(vector) == sizeof(void*)); /**************************************************************************************************/ diff --git a/adobe/virtual_machine.hpp b/adobe/virtual_machine.hpp index 1a9981ef..aae50630 100644 --- a/adobe/virtual_machine.hpp +++ b/adobe/virtual_machine.hpp @@ -11,10 +11,10 @@ #include #include +#include #include #define BOOST_FUNCTION_NO_DEPRECATED -#include #include #include @@ -29,7 +29,7 @@ namespace adobe { /**************************************************************************************************/ /* Note: For all bitwise operators the numeric data type (double) will be cast down to a - boost::uint32_t for the operation. + std::uint32_t for the operation. */ class virtual_machine_t { public: @@ -42,16 +42,16 @@ class virtual_machine_t { typedef any_regular_t(numeric_index_lookup_signature_t)(const any_regular_t&, std::size_t index); - typedef boost::function variable_lookup_t; - typedef boost::function dictionary_function_lookup_t; - typedef boost::function array_function_lookup_t; - typedef boost::function named_index_lookup_t; - typedef boost::function numeric_index_lookup_t; + using variable_lookup_t = std::function; + using dictionary_function_lookup_t = std::function; + using array_function_lookup_t = std::function; + using named_index_lookup_t = std::function; + using numeric_index_lookup_t = std::function; typedef any_regular_t(binary_op_override_signature_t)(const any_regular_t&, const any_regular_t&); - typedef boost::function binary_op_override_t; + using binary_op_override_t = std::function; #if !defined(ADOBE_NO_DOCUMENTATION) virtual_machine_t(); diff --git a/adobe/xml_parser.hpp b/adobe/xml_parser.hpp index 62283815..9103d28f 100644 --- a/adobe/xml_parser.hpp +++ b/adobe/xml_parser.hpp @@ -24,14 +24,13 @@ #include #include -#include #include -#include #include #include #include #include +#include #include #include #include @@ -414,7 +413,7 @@ typedef token_range_t(implementation_xml_element_proc_t)(const token_range_t& en const attribute_set_t& attribute_set, const token_range_t& value); -typedef boost::function xml_element_proc_t; +using xml_element_proc_t = std::function; /**************************************************************************************************/ @@ -422,9 +421,9 @@ typedef boost::function xml_element_proc_t; template // O models OutputIterator class xml_parser_t : public boost::noncopyable { public: - typedef xml_element_proc_t callback_proc_t; - typedef boost::function preorder_predicate_t; - typedef xml_lex_t::token_type token_type; + using callback_proc_t = xml_element_proc_t; + using preorder_predicate_t = std::function; + using token_type = xml_lex_t::token_type; xml_parser_t(uchar_ptr_t first, uchar_ptr_t last, const line_position_t& position, preorder_predicate_t predicate, callback_proc_t callback, O output) diff --git a/adobe/xstring.hpp b/adobe/xstring.hpp index faf70b75..e789635d 100644 --- a/adobe/xstring.hpp +++ b/adobe/xstring.hpp @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/source/adam.cpp b/source/adam.cpp index 0928c76e..f02f7c04 100644 --- a/source/adam.cpp +++ b/source/adam.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include @@ -31,6 +30,8 @@ #include #include +#include + #ifndef NDEBUG #include @@ -233,7 +234,7 @@ class sheet_t::implementation_t : boost::noncopyable { }; struct cell_t { - typedef boost::function calculator_t; + using calculator_t = std::function; typedef empty_copy> monitor_invariant_list_t; typedef empty_copy> @@ -305,7 +306,7 @@ class sheet_t::implementation_t : boost::noncopyable { void clear_dirty() { dirty_m = false; relation_count_m = initial_relation_count_m; - term_m.clear(); + term_m = nullptr; evaluated_m = specifier_m == access_input || specifier_m == access_constant /* || calculator_m.empty() */; @@ -486,7 +487,7 @@ sheet_t::implementation_t::cell_t::cell_t(access_specifier_t specifier, name_t n const calculator_t& calculator, std::size_t cell_set_pos, cell_t* input) : specifier_m(specifier), name_m(name), calculator_m(calculator), linked_m(false), - invariant_m(false), priority_m(0), resolved_m(false), evaluated_m(calculator_m.empty()), + invariant_m(false), priority_m(0), resolved_m(false), evaluated_m(!calculator_m), relation_count_m(0), initial_relation_count_m(0), cell_set_pos_m(cell_set_pos), interface_input_m(input) {} @@ -1528,7 +1529,7 @@ any_regular_t sheet_t::implementation_t::get(name_t variable_name) { assert(cell.interface_input_m && "FATAL (sparent) : Only interface cells should be on the get stack."); - if (!get_stack_m.back().second && !cell.term_m.empty()) { + if (!get_stack_m.back().second && cell.term_m) { get_stack_m.back().second = true; return cell.term_m(); } else { diff --git a/source/adam_parser.cpp b/source/adam_parser.cpp index 7e126420..5149bda9 100644 --- a/source/adam_parser.cpp +++ b/source/adam_parser.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include diff --git a/source/eve.cpp b/source/eve.cpp index 621ee864..2aa7f737 100644 --- a/source/eve.cpp +++ b/source/eve.cpp @@ -7,14 +7,13 @@ #include +#include #include #include #include #include #include -#include -#include #include #include @@ -90,16 +89,16 @@ struct view_proxy_t : adobe::extents_slices_t { bool visible_m; - typedef boost::array fr_guide_set_t; + typedef std::array fr_guide_set_t; layout_attributes_t geometry_m; // REVISIT (sparent) : make const place_data_t place_m; int space_before_m; // populated from spacing_m of parent - boost::array container_length_m; // calculated length of container - boost::array measured_length_m; // length of container children only + std::array container_length_m; // calculated length of container + std::array measured_length_m; // length of container children only - boost::array container_guide_set_m; // forward/reverse guide set for + std::array container_guide_set_m; // forward/reverse guide set for // container void calculate(); @@ -495,15 +494,6 @@ namespace implementation { /**************************************************************************************************/ -struct calculate : public boost::static_visitor<> { - template - void operator()(T& operand) const { - operand += operand; - } -}; - -/**************************************************************************************************/ - view_proxy_t::view_proxy_t(const adobe::layout_attributes_t& d, poly_placeable_t& p) : placeable_m(p), visible_m(true), geometry_m(d) {} diff --git a/source/eve_parser.cpp b/source/eve_parser.cpp index 288a1d98..66f91728 100644 --- a/source/eve_parser.cpp +++ b/source/eve_parser.cpp @@ -9,7 +9,6 @@ #include -#include #include #include diff --git a/source/expression_filter.cpp b/source/expression_filter.cpp index 6c66000f..4fa130ab 100644 --- a/source/expression_filter.cpp +++ b/source/expression_filter.cpp @@ -103,11 +103,11 @@ copy_until(I first, I last, O output, /**************************************************************************************************/ -#define ADOBE_CODE_POINT(x) boost::uint32_t(x##UL) +#define ADOBE_CODE_POINT(x) std::uint32_t(x##UL) /**************************************************************************************************/ -typedef pair code_point_set_value_type; +typedef pair code_point_set_value_type; typedef vector code_point_set_t; /**************************************************************************************************/ @@ -403,7 +403,7 @@ const code_point_set_t& code_point_set() { /**************************************************************************************************/ -typedef adobe::table_index +typedef adobe::table_index code_point_index_type; /**************************************************************************************************/ @@ -427,7 +427,7 @@ const code_point_index_type& code_point_index() { /**************************************************************************************************/ -code_point_index_type::const_iterator code_point_index_find(boost::uint32_t code_point) { +code_point_index_type::const_iterator code_point_index_find(std::uint32_t code_point) { const code_point_index_type& index(code_point_index()); code_point_index_type::const_iterator found(adobe::lower_bound( index, code_point, adobe::compare_members(&code_point_set_t::value_type::second))); @@ -482,7 +482,7 @@ namespace adobe { /**************************************************************************************************/ -const string& entity_map_find(boost::uint32_t code_point) { +const string& entity_map_find(std::uint32_t code_point) { code_point_index_type::const_iterator found(code_point_index_find(code_point)); if (found == code_point_index().end()) @@ -493,12 +493,12 @@ const string& entity_map_find(boost::uint32_t code_point) { /**************************************************************************************************/ -boost::uint32_t entity_map_find(const string& entity) { +std::uint32_t entity_map_find(const string& entity) { string::const_iterator first(entity.begin()); if (entity.size() > 1 && *first == '#') { string::const_iterator last(entity.end()); - boost::uint32_t result; + std::uint32_t result; ++first; @@ -528,7 +528,7 @@ bool needs_entity_escape(const string& value) { return true; code_point_index_type::const_iterator found( - code_point_index_find(static_cast(c))); + code_point_index_find(static_cast(c))); if (found != code_point_index().end()) return true; @@ -548,7 +548,7 @@ string entity_escape(const string& value) { unsigned char c(*iter); code_point_index_type::const_iterator found( - code_point_index_find(static_cast(c))); + code_point_index_find(static_cast(c))); if (found != code_point_index().end()) { result.push_back('&'); @@ -611,7 +611,7 @@ string entity_unescape(const string& value) { // snip out the entity and look it up in the map - boost::uint32_t code_point(entity_map_find(string(next, next_end))); + std::uint32_t code_point(entity_map_find(string(next, next_end))); if (code_point != 0) adobe::copy_utf(&code_point, &code_point + 1, std::back_inserter(result)); diff --git a/source/expression_parser.cpp b/source/expression_parser.cpp index a764d0d9..0109b8fb 100644 --- a/source/expression_parser.cpp +++ b/source/expression_parser.cpp @@ -18,7 +18,6 @@ with regards to state. #include #include -#include #include #include diff --git a/source/iomanip_asl_cel.cpp b/source/iomanip_asl_cel.cpp index 8d315096..83307997 100644 --- a/source/iomanip_asl_cel.cpp +++ b/source/iomanip_asl_cel.cpp @@ -9,8 +9,6 @@ /**************************************************************************************************/ -#include - #include #include diff --git a/source/iomanip_javascript.cpp b/source/iomanip_javascript.cpp index 3743de47..54413756 100644 --- a/source/iomanip_javascript.cpp +++ b/source/iomanip_javascript.cpp @@ -11,8 +11,6 @@ #include -#include - #include #include #include @@ -139,7 +137,7 @@ void javascript_format::handle_atom(stream_type& os, bool is_push) { os << (value.cast() ? "true" : "false"); } else if (value.type_info() == typeid(double)) { double dbl_val(value.cast()); - boost::int64_t int_val(static_cast(dbl_val)); + std::int64_t int_val(static_cast(dbl_val)); if (dbl_val == int_val) { os << int_val; diff --git a/source/iomanip_pdf.cpp b/source/iomanip_pdf.cpp index 720e6803..dc8e7aec 100644 --- a/source/iomanip_pdf.cpp +++ b/source/iomanip_pdf.cpp @@ -11,8 +11,6 @@ #include -#include - #include #include #include @@ -134,7 +132,7 @@ void pdf_format::handle_atom(stream_type& os, bool is_push) { os << (value.cast() ? "true" : "false"); } else if (value.type_info() == typeid(double)) { double dbl_val(value.cast()); - boost::int64_t int_val(static_cast(dbl_val)); + std::int64_t int_val(static_cast(dbl_val)); if (dbl_val == int_val) { os << int_val; diff --git a/source/iomanip_xml.cpp b/source/iomanip_xml.cpp index ece7ad96..1460086d 100644 --- a/source/iomanip_xml.cpp +++ b/source/iomanip_xml.cpp @@ -11,8 +11,6 @@ #include -#include - #include #include #include @@ -126,7 +124,7 @@ void xml_format::handle_atom(stream_type& os, bool is_push) { os << "" << (value.cast() ? "true" : "false") << ""; } else if (value.type_info() == typeid(double)) { double dbl_val(value.cast()); - boost::int64_t int_val(static_cast(dbl_val)); + std::int64_t int_val(static_cast(dbl_val)); if (dbl_val == int_val) os << "" << int_val << ""; diff --git a/source/lex_stream.cpp b/source/lex_stream.cpp index e37c2e0d..05706230 100644 --- a/source/lex_stream.cpp +++ b/source/lex_stream.cpp @@ -7,11 +7,11 @@ #include +#include #include #include #include -#include #include #include @@ -44,7 +44,7 @@ namespace { /**************************************************************************************************/ -typedef boost::array keyword_table_t; +using keyword_table_t = std::array; /**************************************************************************************************/ @@ -443,7 +443,7 @@ bool lex_stream_t::implementation_t::is_identifier_or_keyword(char c, stream_lex keyword_table_t::const_iterator iter(lower_bound(*keywords_g, ident)); if ((iter != keywords_g->end() && *iter == ident) || - (!keyword_proc_m.empty() && keyword_proc_m(ident))) { + (keyword_proc_m && keyword_proc_m(ident))) { result = stream_lex_token_t(keyword_k, any_regular_t(ident)); } else { result = stream_lex_token_t(identifier_k, any_regular_t(ident)); diff --git a/source/localization.cpp b/source/localization.cpp index 3308e8b1..badb70c2 100644 --- a/source/localization.cpp +++ b/source/localization.cpp @@ -40,7 +40,7 @@ std::string localization_invoke(const std::string& source) { return localization_proc()(source); } -bool localization_ready() { return localization_proc(); } +bool localization_ready() { return static_cast(localization_proc()); } /**************************************************************************************************/ diff --git a/source/string.cpp b/source/string.cpp index 478dcdc0..8dec6338 100644 --- a/source/string.cpp +++ b/source/string.cpp @@ -55,21 +55,21 @@ void string_t::push_back(value_type c) /**************************************************************************************************/ -string16_t::string16_t(const boost::uint16_t* s, std::size_t length) +string16_t::string16_t(const std::uint16_t* s, std::size_t length) { assign(s, s + length); } -string16_t::string16_t(const boost::uint16_t* s) +string16_t::string16_t(const std::uint16_t* s) { - const boost::uint16_t* last(s); + const std::uint16_t* last(s); while (0 != *last) ++last; assign(s, last); } -const boost::uint16_t* string16_t::c_str() const +const std::uint16_t* string16_t::c_str() const { - static const boost::uint16_t empty_string_s(0); + static const std::uint16_t empty_string_s(0); return empty() ? &empty_string_s : &storage_m[0]; } @@ -89,9 +89,9 @@ void string16_t::push_back(value_type c) storage_m.push_back(value_type(0)); } -void string16_t::append(const boost::uint16_t* s) +void string16_t::append(const std::uint16_t* s) { - const boost::uint16_t* last(s); + const std::uint16_t* last(s); while (0 != *last) ++last; append(s, last); } diff --git a/source/test_configuration.cpp b/source/test_configuration.cpp deleted file mode 100644 index c644fa5c..00000000 --- a/source/test_configuration.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright 2013 Adobe - 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) -*/ -/**************************************************************************************************/ - - -/* - REVISIT (sparent) : As this file is expanded it should include boost/config.hpp and use the - macros defined there to perform these checks. For now this, header is being maintained - without the additional dependencies. -*/ - - -#ifdef __MWERKS__ - -#if __MWERKS__ < 0x3003 -#error "Metrowerks Version 8.3 or newer is required." -#endif - -#if __MWERKS__ == 0x3003 -#include - -/* -NOTE (sparent) : The leading double underscore should not have been used (reserved by -the standard for compiler vendors). However, this fix is confined to a single version -of a single compiler and Photoshop already defined the symbol so I'm letting it go. -*/ - -#ifndef __ADOBE_FIX_FOR_BASIC_STRING_ALLOCATION__ -#warning "File may not contain fix for basic string allocation." -/* - NOTE (sparent) : Line 1994 of must be changed from: - traits::assign(*(data_ + n), charT()); - to: - traits::assign(*(data_ + size_), charT()); - - After making the change the following line should be added to the file: - - #define __ADOBE_FIX_FOR_BASIC_STRING_ALLOCATION__ -*/ -#endif - -#endif - -#endif diff --git a/source/virtual_machine.cpp b/source/virtual_machine.cpp index 597e131a..e311048a 100644 --- a/source/virtual_machine.cpp +++ b/source/virtual_machine.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -85,8 +86,8 @@ namespace { using namespace adobe::literals; typedef void (adobe::virtual_machine_t::implementation_t::*operator_t)(); -typedef boost::function array_function_t; -typedef boost::function dictionary_function_t; +using array_function_t = std::function; +using dictionary_function_t = std::function; typedef vector stack_type; // REVISIT (sparent) : GCC 3.1 the symbol stack_t // conflicts with a symbol in signal.h @@ -271,37 +272,37 @@ void throw_function_not_defined(adobe::name_t function_name) { /**************************************************************************************************/ struct bitwise_and_t { - inline boost::uint32_t operator()(boost::uint32_t x, boost::uint32_t y) const { return x & y; } + inline std::uint32_t operator()(std::uint32_t x, std::uint32_t y) const { return x & y; } }; /**************************************************************************************************/ struct bitwise_xor_t { - inline boost::uint32_t operator()(boost::uint32_t x, boost::uint32_t y) const { return x ^ y; } + inline std::uint32_t operator()(std::uint32_t x, std::uint32_t y) const { return x ^ y; } }; /**************************************************************************************************/ struct bitwise_or_t { - inline boost::uint32_t operator()(boost::uint32_t x, boost::uint32_t y) const { return x | y; } + inline std::uint32_t operator()(std::uint32_t x, std::uint32_t y) const { return x | y; } }; /**************************************************************************************************/ struct bitwise_rshift_t { - inline boost::uint32_t operator()(boost::uint32_t x, boost::uint32_t y) const { return x >> y; } + inline std::uint32_t operator()(std::uint32_t x, std::uint32_t y) const { return x >> y; } }; /**************************************************************************************************/ struct bitwise_lshift_t { - inline boost::uint32_t operator()(boost::uint32_t x, boost::uint32_t y) const { return x << y; } + inline std::uint32_t operator()(std::uint32_t x, std::uint32_t y) const { return x << y; } }; /**************************************************************************************************/ struct bitwise_negate_t { - inline boost::uint32_t operator()(boost::uint32_t x) const { return ~x; } + inline std::uint32_t operator()(std::uint32_t x) const { return ~x; } }; /**************************************************************************************************/ @@ -752,7 +753,7 @@ void virtual_machine_t::implementation_t::bitwise_binary_operator() { // values to which they point... when and if the vm becomes big enough of a // bottleneck to warrant the work. - boost::uint32_t operand2_value(0); // something reasonable + std::uint32_t operand2_value(0); // something reasonable if (back().type_info() == typeid(adobe::array_t)) { adobe::array_t operand2_exp(back().cast()); @@ -760,9 +761,9 @@ void virtual_machine_t::implementation_t::bitwise_binary_operator() { evaluate(operand2_exp); adobe::any_regular_t operand2 = back(); - operand2_value = static_cast(operand2.cast()); + operand2_value = static_cast(operand2.cast()); } else if (back().type_info() == typeid(double)) { - operand2_value = static_cast(back().cast()); + operand2_value = static_cast(back().cast()); } else { throw std::logic_error("unknown type"); } @@ -770,9 +771,9 @@ void virtual_machine_t::implementation_t::bitwise_binary_operator() { pop_back(); // pop operand2 adobe::any_regular_t& operand1 = back(); - boost::uint32_t operand1_value(static_cast(operand1.cast())); + std::uint32_t operand1_value(static_cast(operand1.cast())); - boost::uint32_t result(BitwiseOp()(operand1_value, operand2_value)); + std::uint32_t result(BitwiseOp()(operand1_value, operand2_value)); operand1.assign(static_cast(result)); // assign operand1 in-place } @@ -781,8 +782,8 @@ void virtual_machine_t::implementation_t::bitwise_binary_operator() { template void virtual_machine_t::implementation_t::bitwise_unary_operator() { adobe::any_regular_t& operand1 = back(); - boost::uint32_t operand1_value(static_cast(operand1.cast())); - boost::uint32_t result(BitwiseOp()(operand1_value)); + std::uint32_t operand1_value(static_cast(operand1.cast())); + std::uint32_t result(BitwiseOp()(operand1_value)); operand1.assign(static_cast(result)); // assign operand1 in-place } diff --git a/source/xml_parser.cpp b/source/xml_parser.cpp index f3e00112..fa1fd5af 100644 --- a/source/xml_parser.cpp +++ b/source/xml_parser.cpp @@ -29,7 +29,7 @@ namespace { /**************************************************************************************************/ -adobe::token_range_t to_token_range(boost::uint32_t code) { +adobe::token_range_t to_token_range(std::uint32_t code) { // REVISIT (fbrereto) : Allocation in this function needs to go if (code == 0) diff --git a/source/xstring.cpp b/source/xstring.cpp index de9a1f2c..8b7dac24 100644 --- a/source/xstring.cpp +++ b/source/xstring.cpp @@ -17,7 +17,6 @@ #include #include -#include #include diff --git a/source/zuid_sys_dep.cpp b/source/zuid_sys_dep.cpp index 090fb51a..f6770918 100644 --- a/source/zuid_sys_dep.cpp +++ b/source/zuid_sys_dep.cpp @@ -33,10 +33,6 @@ #pragma warning(pop) #endif -#if defined(BOOST_HAS_THREADS) -#include -#endif - #if defined(BOOST_HAS_GETTIMEOFDAY) #include #endif @@ -87,7 +83,7 @@ namespace { struct uuid_state_t { adobe::uuid_time_t ts_m; /* saved timestamp */ adobe::uuid_node_t node_m; /* saved node ID */ - boost::uint16_t cs_m; /* saved clock sequence */ + std::uint16_t cs_m; /* saved clock sequence */ }; /**************************************************************************************************/ @@ -136,9 +132,7 @@ adobe::md5_t::digest_t get_generic_random_info() { pid_m(getpid()), uid_m(getuid()), gid_m(getgid()) #endif { -#if defined(BOOST_HAS_THREADS) - boost::xtime_get(&time_m, boost::TIME_UTC_); -#endif + time_m = std::chrono::high_resolution_clock::now(); #if ADOBE_HAS_UNISTD_H() gethostname(hostname_m, 256); #endif @@ -148,9 +142,7 @@ adobe::md5_t::digest_t get_generic_random_info() { } std::size_t thread_id_m; -#if defined(BOOST_HAS_THREADS) - boost::xtime time_m; -#endif + std::chrono::time_point time_m; #if ADOBE_HAS_UNISTD_H() pid_t pid_m; uid_t uid_m; @@ -270,8 +262,8 @@ void get_ieee_node_identifier(uuid_node_t* node) { This sample doesn't do that, but it's closer than the last one. */ -boost::uint64_t true_random() { - boost::uint64_t result; +std::uint64_t true_random() { + std::uint64_t result; adobe::md5_t::digest_t seed(get_random_info()); std::memcpy(&result, &seed[0], sizeof(result)); @@ -282,13 +274,13 @@ boost::uint64_t true_random() { /**************************************************************************************************/ /* read_state -- read UUID generator state from non-volatile store */ -boost::int16_t read_state(boost::uint16_t* clockseq, uuid_time_t* timestamp, uuid_node_t* node) { +std::int16_t read_state(std::uint16_t* clockseq, uuid_time_t* timestamp, uuid_node_t* node) { init_zuid_sys_dep_once(); bool& state_inited(ADOBE_THREAD_LOCAL_STORAGE_ACCESS(zuid_uuid_state_inited)); if (!state_inited) - return boost::int16_t(0); + return std::int16_t(0); uuid_state_t& state(ADOBE_THREAD_LOCAL_STORAGE_ACCESS(zuid_uuid_state)); @@ -296,11 +288,11 @@ boost::int16_t read_state(boost::uint16_t* clockseq, uuid_time_t* timestamp, uui *timestamp = state.ts_m; *node = state.node_m; - return boost::int16_t(1); + return std::int16_t(1); } /* write_state -- save UUID generator state back to non-volatile storage */ -void write_state(boost::uint16_t clockseq, uuid_time_t timestamp, uuid_node_t node) { +void write_state(std::uint16_t clockseq, uuid_time_t timestamp, uuid_node_t node) { init_zuid_sys_dep_once(); bool& state_inited(ADOBE_THREAD_LOCAL_STORAGE_ACCESS(zuid_uuid_state_inited)); diff --git a/source/zuid_uuid.cpp b/source/zuid_uuid.cpp index 0e69b185..833f964f 100644 --- a/source/zuid_uuid.cpp +++ b/source/zuid_uuid.cpp @@ -48,16 +48,16 @@ namespace { /* make a UUID from the timestamp, clockseq, and node ID */ -void format_uuid_v1(uuid_t* uuid, boost::uint16_t clock_seq, uuid_time_t timestamp, +void format_uuid_v1(uuid_t* uuid, std::uint16_t clock_seq, uuid_time_t timestamp, uuid_node_t node) { // Construct a version 1 uuid with the information we've gathered plus a few constants. - uuid->data1_m = (boost::uint32_t)(timestamp & 0xFFFFFFFF); - uuid->data2_m = (boost::uint16_t)((timestamp >> 32) & 0xFFFF); - uuid->data3_m = (boost::uint16_t)((timestamp >> 48) & 0x0FFF); + uuid->data1_m = (std::uint32_t)(timestamp & 0xFFFFFFFF); + uuid->data2_m = (std::uint16_t)((timestamp >> 32) & 0xFFFF); + uuid->data3_m = (std::uint16_t)((timestamp >> 48) & 0x0FFF); uuid->data3_m |= (1 << 12); - uuid->data4_m[1] = boost::uint8_t(clock_seq & 0xFF); - uuid->data4_m[0] = boost::uint8_t((clock_seq & 0x3F00) >> 8); + uuid->data4_m[1] = std::uint8_t(clock_seq & 0xFF); + uuid->data4_m[0] = std::uint8_t((clock_seq & 0x3F00) >> 8); uuid->data4_m[0] |= 0x80; std::memcpy(&uuid->data4_m[2], &node, 6); @@ -67,7 +67,7 @@ void format_uuid_v1(uuid_t* uuid, boost::uint16_t clock_seq, uuid_time_t timesta /* make a UUID from a (pseudo)random 128 bit number */ -void format_uuid_v3(uuid_t* uuid, boost::uint8_t hash[16]) { +void format_uuid_v3(uuid_t* uuid, std::uint8_t hash[16]) { /* Construct a version 3 uuid with the (pseudo-)random number * plus a few constants. */ @@ -99,7 +99,7 @@ void format_uuid_v3(uuid_t* uuid, boost::uint8_t hash[16]) { void get_current_time(uuid_time_t* timestamp) { static uuid_time_t time_last; - static boost::uint16_t uuids_this_tick(0); + static std::uint16_t uuids_this_tick(0); static bool inited(false); if (!inited) { @@ -136,13 +136,13 @@ void get_current_time(uuid_time_t* timestamp) { /**************************************************************************************************/ /* uuid_create -- generator a UUID */ -boost::int16_t uuid_create(uuid_t* uuid) { +std::int16_t uuid_create(uuid_t* uuid) { uuid_time_t timestamp; uuid_time_t last_time; - boost::uint16_t clockseq; + std::uint16_t clockseq; uuid_node_t node; uuid_node_t last_node; - boost::int16_t f; + std::int16_t f; /* get current time */ get_current_time(×tamp); @@ -159,7 +159,7 @@ boost::int16_t uuid_create(uuid_t* uuid) { */ if (!f || node != last_node) - clockseq = static_cast(true_random()); + clockseq = static_cast(true_random()); else if (timestamp < last_time) clockseq++; @@ -169,15 +169,14 @@ boost::int16_t uuid_create(uuid_t* uuid) { /* save the state for next time */ write_state(clockseq, timestamp, node); - return boost::int16_t(1); + return std::int16_t(1); } /**************************************************************************************************/ /* uuid_create_from_name -- create a UUID using a "name" from a "name space" */ -void uuid_create_from_name(uuid_t* uuid, uuid_t nsid, boost::uint8_t* name, - boost::uint16_t namelen) { +void uuid_create_from_name(uuid_t* uuid, uuid_t nsid, std::uint8_t* name, std::uint16_t namelen) { uuid_t net_nsid; /* context UUID in network byte order */ /* @@ -201,16 +200,16 @@ void uuid_create_from_name(uuid_t* uuid, uuid_t nsid, boost::uint8_t* name, /**************************************************************************************************/ -boost::int16_t uuid_compare(const uuid_t* u1, const uuid_t* u2) { +std::int16_t uuid_compare(const uuid_t* u1, const uuid_t* u2) { #define ADOBE_UUID_COMPARE_CHECK(f1, f2) \ if (f1 != f2) \ - return (f1 < f2) ? boost::int16_t(-1) : boost::int16_t(1); + return (f1 < f2) ? std::int16_t(-1) : std::int16_t(1); ADOBE_UUID_COMPARE_CHECK(u1->data1_m, u2->data1_m); ADOBE_UUID_COMPARE_CHECK(u1->data2_m, u2->data2_m); ADOBE_UUID_COMPARE_CHECK(u1->data3_m, u2->data3_m); - for (boost::int16_t i(0); i < 8; ++i) { + for (std::int16_t i(0); i < 8; ++i) { ADOBE_UUID_COMPARE_CHECK(u1->data4_m[i], u2->data4_m[i]); } diff --git a/test/adam_smoke/adam_smoke_test.cpp b/test/adam_smoke/adam_smoke_test.cpp index 6989be85..6c5d74a2 100644 --- a/test/adam_smoke/adam_smoke_test.cpp +++ b/test/adam_smoke/adam_smoke_test.cpp @@ -7,12 +7,12 @@ #include +#include +#include #include #include #include -#include -#include #include #include @@ -33,7 +33,7 @@ using namespace boost::placeholders; /**************************************************************************************************/ -namespace bfs = boost::filesystem; +namespace fs = std::filesystem; /**************************************************************************************************/ @@ -66,7 +66,7 @@ void usage(const std::string& app_name) { /**************************************************************************************************/ -adobe::dictionary_t read_dictionary(const bfs::path& filepath) { +adobe::dictionary_t read_dictionary(const fs::path& filepath) { std::ifstream input_file(filepath.native().c_str()); adobe::expression_parser parser(input_file, adobe::line_position_t("input dictionary")); adobe::array_t expression; @@ -93,7 +93,7 @@ adobe::dictionary_t read_dictionary(const bfs::path& filepath) { /**************************************************************************************************/ -void read_sheet(const bfs::path& filepath, adobe::sheet_t& sheet) { +void read_sheet(const fs::path& filepath, adobe::sheet_t& sheet) { std::ifstream input_file(filepath.native().c_str()); if (!input_file.is_open()) { @@ -149,12 +149,12 @@ bool compare_arrays(const adobe::array_t& a, const adobe::array_t& b) { /**************************************************************************************************/ -bool test_sheet(const bfs::path& root) { +bool test_sheet(const fs::path& root) { using namespace adobe::literals; bool success(true); - bfs::path sheet_path(root); - bfs::path input_path(root.string() + "i"); + fs::path sheet_path(root); + fs::path input_path(root.string() + "i"); adobe::sheet_t sheet; adobe::dictionary_t input; adobe::dictionary_t contributing; @@ -223,7 +223,7 @@ int main(int argc, char* argv[]) { if (!std::strcmp(argv[1], "--help")) { usage(argv[0]); } else { - result = !test_sheet(bfs::path(argv[1])); + result = !test_sheet(fs::path(argv[1])); } } } catch (const std::exception& error) { diff --git a/test/adam_tutorial/main.cpp b/test/adam_tutorial/main.cpp index 93f7bc27..1aa7cd11 100644 --- a/test/adam_tutorial/main.cpp +++ b/test/adam_tutorial/main.cpp @@ -7,12 +7,12 @@ #include +#include +#include #include #include #include -#include -#include #include #include @@ -30,7 +30,7 @@ /**************************************************************************************************/ -namespace bfs = boost::filesystem; +namespace fs = std::filesystem; using namespace boost::placeholders; /**************************************************************************************************/ @@ -56,7 +56,7 @@ void stream_cell_state(const cell_set_t::value_type& cell) { /**************************************************************************************************/ -adobe::dictionary_t parse_input_dictionary(const bfs::path& input_path) { +adobe::dictionary_t parse_input_dictionary(const fs::path& input_path) { const auto& path_str{input_path.native()}; std::ifstream input_stream{path_str.c_str()}; adobe::array_t token_stream; @@ -83,7 +83,7 @@ adobe::dictionary_t parse_input_dictionary(const bfs::path& input_path) { /**************************************************************************************************/ struct sheet_tracker { - sheet_tracker(const bfs::path& sheet_path, const bfs::path& input_path) + sheet_tracker(const fs::path& sheet_path, const fs::path& input_path) : callbacks_m(adobe::bind_to_sheet(sheet_m)) { // attach the VM to the sheet. sheet_m.machine_m.set_variable_lookup(boost::bind(&adobe::sheet_t::get, &sheet_m, _1)); @@ -257,9 +257,9 @@ int main(int argc, char* argv[]) { std::cout << "--" << std::endl; std::string sheet_pathname(argc > 1 ? (argv[1]) : ("default.adm")); - bfs::path sheet_filepath(sheet_pathname.c_str()); + fs::path sheet_filepath(sheet_pathname.c_str()); std::string input_pathname(argc > 2 ? (argv[2]) : ("input.cel")); - bfs::path input_filepath(input_pathname.c_str()); + fs::path input_filepath(input_pathname.c_str()); sheet_tracker(sheet_filepath, input_filepath).loop(); } catch (const std::exception& error) { diff --git a/test/eve_smoke/main.cpp b/test/eve_smoke/main.cpp index 2cf16af3..298b12d4 100644 --- a/test/eve_smoke/main.cpp +++ b/test/eve_smoke/main.cpp @@ -5,14 +5,14 @@ */ /**************************************************************************************************/ +#include +#include #include #include #include #include #include -#include -#include #include #include @@ -63,11 +63,11 @@ adobe::eve_callback_suite_t::position_t assemble(adobe::name_t name, /// /// \param fileName the name of the file to parse. // -void testParse(boost::filesystem::path& fileName) { +void testParse(std::filesystem::path& fileName) { // // Open our input stream. // - boost::filesystem::ifstream stream(fileName); + std::ifstream stream(fileName); if (!stream.is_open()) { std::stringstream err; @@ -119,10 +119,10 @@ int main(int argc, char* argv[]) { // try to open "default.eve". // try { - boost::filesystem::path file_path("default.eve"); + std::filesystem::path file_path("default.eve"); if (argc > 1) - file_path = boost::filesystem::path(argv[1]); + file_path = std::filesystem::path(argv[1]); // // Call our testParse function with the selected filename. diff --git a/test/json/any_json_helper.cpp b/test/json/any_json_helper.cpp index 76d38789..a23c842e 100644 --- a/test/json/any_json_helper.cpp +++ b/test/json/any_json_helper.cpp @@ -7,13 +7,13 @@ /**************************************************************************************************/ // stdc++ +#include #include #include #define BOOST_TEST_MAIN // boost -#include #include // asl @@ -25,7 +25,6 @@ /**************************************************************************************************/ using namespace std; -using namespace boost; using namespace adobe; /**************************************************************************************************/ diff --git a/test/md5/check_md5.cpp b/test/md5/check_md5.cpp index 6083af55..8dfa4f71 100644 --- a/test/md5/check_md5.cpp +++ b/test/md5/check_md5.cpp @@ -5,12 +5,12 @@ */ #include +#include +#include #include #include #include -#include -#include #include #include @@ -33,8 +33,8 @@ int main(int argc, char* argv[]) { try { adobe::md5_t m; - boost::filesystem::path file_path(argv[2]); - boost::filesystem::ifstream stream(file_path, std::ios::binary | std::ios::in); + std::filesystem::path file_path(argv[2]); + std::ifstream stream(file_path, std::ios::binary | std::ios::in); while (stream.good()) { std::array buffer; diff --git a/test/property_model_eval/adam_test_parser.cpp b/test/property_model_eval/adam_test_parser.cpp index 618ef440..e0e90510 100644 --- a/test/property_model_eval/adam_test_parser.cpp +++ b/test/property_model_eval/adam_test_parser.cpp @@ -11,9 +11,9 @@ #include "adam_test_parser.hpp" #include "adam_test_parser_impl.hpp" +#include #include -#include #include #include "iomanip_flat.hpp" @@ -38,7 +38,7 @@ namespace { /**************************************************************************************************/ -typedef boost::array keyword_table_t; +using keyword_table_t = std::array; /**************************************************************************************************/ diff --git a/test/property_model_eval/pmeval.cpp b/test/property_model_eval/pmeval.cpp index db244296..e4e32986 100644 --- a/test/property_model_eval/pmeval.cpp +++ b/test/property_model_eval/pmeval.cpp @@ -7,9 +7,10 @@ /**************************************************************************************************/ +#include +#include #include -#include #include #include @@ -88,7 +89,7 @@ int main(int argc, char* argv[]) { for (std::vector::const_iterator i = input_files.begin(), end = input_files.end(); i != end; ++i) { - boost::filesystem::path in_path(*i); + std::filesystem::path in_path(*i); const auto& native_path{in_path.native()}; std::ifstream in_stream(native_path.c_str()); diff --git a/test/serialization/main.cpp b/test/serialization/main.cpp index 3a385e4c..18887a99 100644 --- a/test/serialization/main.cpp +++ b/test/serialization/main.cpp @@ -6,8 +6,6 @@ #include -#include - #include #include #include diff --git a/test/sha/main.cpp b/test/sha/main.cpp index 2a1259e0..85e4bf2a 100644 --- a/test/sha/main.cpp +++ b/test/sha/main.cpp @@ -50,16 +50,16 @@ namespace { /**************************************************************************************************/ struct unit_test_t { - unit_test_t(const char* message, boost::uint64_t bitsize, const char* digest) + unit_test_t(const char* message, std::uint64_t bitsize, const char* digest) : message_m(message, static_cast(bitsize / 8 + ((bitsize % 8 == 0) ? 0 : 1))), bitsize_m(bitsize), digest_m(digest) {} unit_test_t(const std::string& message, const char* digest) - : message_m(message), bitsize_m(std::numeric_limits::max()), + : message_m(message), bitsize_m(std::numeric_limits::max()), digest_m(digest) {} std::string message_m; - boost::uint64_t bitsize_m; + std::uint64_t bitsize_m; const char* digest_m; }; @@ -224,7 +224,7 @@ void test_hash(const C& container) { const std::string& test_string(cur_test.message_m); std::string::const_iterator test_string_first(test_string.begin()); std::string::const_iterator test_string_last(test_string.end()); - bool modified_bitsize(cur_test.bitsize_m != std::numeric_limits::max()); + bool modified_bitsize(cur_test.bitsize_m != std::numeric_limits::max()); digest_type hash_digest = {{0}}; adobe::timer_t timer; diff --git a/test/unit_tests/copy_on_write/cow_test.cpp b/test/unit_tests/copy_on_write/cow_test.cpp index 63eaefad..a590f795 100644 --- a/test/unit_tests/copy_on_write/cow_test.cpp +++ b/test/unit_tests/copy_on_write/cow_test.cpp @@ -135,8 +135,8 @@ std::string make_value(const long& x) { template void test_copy_on_write() { enum { - is_noisy = boost::is_same>::value + is_noisy = std::is_same>::value }; typename CowType::value_type (*mv)(const long&) =