s/concept/concept_ in preparation for potential C++20 keyword

This commit is contained in:
joaquintides
2017-06-10 18:08:59 +02:00
parent 8cb523c123
commit 7bc8248188
4 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -703,7 +703,7 @@ Boost.PolyCollection:
* `std::vector<base*>` (or similar) → `boost::base_collection<base>`
* `std::vector<std::function<signature>>` → `boost::function_collection<signature>`
* `std::vector<boost::type_erasure::any<concept>>` → `boost::any_collection<concept>`
* `std::vector<boost::type_erasure::any<concept_>>` → `boost::any_collection<concept_>`
is expected to increase performance due to better caching and branch prediction
behavior. But there is still room for improvement.
@@ -894,8 +894,8 @@ following environments:
[section `boost::any_collection`]
* Baseline container: `any_vector` = `std::vector<boost::type_erasure::any<concept>>`
* Polymorphic collection: `any_collection` = `boost::any_collection<concept>`
* Baseline container: `any_vector` = `std::vector<boost::type_erasure::any<concept_>>`
* Polymorphic collection: `any_collection` = `boost::any_collection<concept_>`
* Element types: `T1` = `int`, `T2` = `double`, `T3` = `char`
[perf_any_types]
+8 -8
View File
@@ -1,4 +1,4 @@
/* Copyright 2016 Joaquin M Lopez Munoz.
/* Copyright 2016-2017 Joaquin M Lopez Munoz.
* 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)
@@ -571,7 +571,7 @@ int main(int argc, char *argv[])
}
{
//[perf_any_types
using concept=boost::mpl::vector<
using concept_=boost::mpl::vector<
boost::type_erasure::copy_constructible<>,
boost::type_erasure::relaxed,
boost::type_erasure::typeid_<>,
@@ -581,17 +581,17 @@ int main(int argc, char *argv[])
auto seq= element_sequence<int,int,double,double,char>{};
auto f= for_each_incrementable{};
auto av= label<any_vector<concept>>
auto av= label<any_vector<concept_>>
{"any_vector"};
auto sav= label<sorted_any_vector<concept>>
auto sav= label<sorted_any_vector<concept_>>
{"sorted any_vector"};
auto shav= label<shuffled_any_vector<concept>>
auto shav= label<shuffled_any_vector<concept_>>
{"shuffled any_vector"};
auto ac= label<any_collection<concept>>
auto ac= label<any_collection<concept_>>
{"any_collection"};
auto fac= label<poly_for_each_any_collection<concept>>
auto fac= label<poly_for_each_any_collection<concept_>>
{"any_collection (poly::for_each)"};
auto rfac= label<poly_for_each_any_collection<concept,int,double,char>>
auto rfac= label<poly_for_each_any_collection<concept_,int,double,char>>
{"any_collection (restituted poly::for_each)"};
if(all||insert_any)insert_perf(n0,n1,dn,seq,av,ac);
@@ -193,11 +193,11 @@ private:
using namespace boost::type_erasure;
using ref_type=any<Concept2,T>;
using make_ref=any_model_make_reference<_self,ref_type>;
using concept=typename concept_of<value_type>::type;
using concept_=typename concept_of<value_type>::type;
auto b=make_binding<mpl::map1<mpl::pair<_self,ref_type>>>();
return {call(binding<make_ref>{b},make_ref{},x),binding<concept>{b}};
return {call(binding<make_ref>{b},make_ref{},x),binding<concept_>{b}};
}
};
+3 -3
View File
@@ -42,8 +42,8 @@ struct incrementable3
double n;
};
using concept=boost::type_erasure::incrementable<>;
using collection=boost::any_collection<concept>;
using concept_=boost::type_erasure::incrementable<>;
using collection=boost::any_collection<concept_>;
template<typename T=boost::type_erasure::_self>
struct convertible_to_int
@@ -59,7 +59,7 @@ using t5=boost::type_erasure::any<
boost::mpl::vector4<
boost::type_erasure::copy_constructible<>,
boost::type_erasure::assignable<>,
concept,
concept_,
convertible_to_int<>
>
>;