From d1e4abccc2976adf6f9edd99df865152a029d1ef Mon Sep 17 00:00:00 2001 From: Jan Travnicek <jan.travnicek@.fit.cvut.cz> Date: Tue, 28 May 2019 15:23:40 +0200 Subject: [PATCH] shorten extended variant definition --- alib2std/src/extensions/container/variant.hpp | 98 +------------------ 1 file changed, 1 insertion(+), 97 deletions(-) diff --git a/alib2std/src/extensions/container/variant.hpp b/alib2std/src/extensions/container/variant.hpp index 9ddedef16c..5372c76afa 100644 --- a/alib2std/src/extensions/container/variant.hpp +++ b/alib2std/src/extensions/container/variant.hpp @@ -64,38 +64,6 @@ struct variant_builder_impl < std::variant < ResTs ... > > : public std::variant * Inherit constructors of the standard variant */ using std::variant < ResTs ... >::variant; - - /** - * Inherit operator = of the standard variant - */ - using std::variant < ResTs ... >::operator=; -#ifndef __clang__ - - /** - * Default constructor needed by g++ since it is not inherited - */ - variant_builder_impl ( ) = default; - - /** - * Copy constructor needed by g++ since it is not inherited - */ - variant_builder_impl ( const variant_builder_impl & other ) = default; - - /** - * Move constructor needed by g++ since it is not inherited - */ - variant_builder_impl ( variant_builder_impl && other ) = default; - - /** - * Copy operator = needed by g++ since it is not inherited - */ - variant_builder_impl & operator = ( variant_builder_impl && other ) = default; - - /** - * Move operator = needed by g++ since it is not inherited - */ - variant_builder_impl & operator = ( const variant_builder_impl & other ) = default; -#endif }; /** @@ -112,38 +80,6 @@ struct variant_builder_impl < std::variant < ResTs ... >, T, Ts ... > : public v * Inherit constructors of the standard variant */ using variant_builder_impl < typename std::conditional < is_in < T, ResTs ... >::value, std::variant < ResTs ... >, std::variant < ResTs ..., T > >::type, Ts ... >::variant_builder_impl; - - /** - * Inherit operator = of the standard variant - */ - using variant_builder_impl < typename std::conditional < is_in < T, ResTs ... >::value, std::variant < ResTs ... >, std::variant < ResTs ..., T > >::type, Ts ... >::operator =; -#ifndef __clang__ - - /** - * Default constructor needed by g++ since it is not inherited - */ - variant_builder_impl ( ) = default; - - /** - * Copy constructor needed by g++ since it is not inherited - */ - variant_builder_impl ( const variant_builder_impl & other ) = default; - - /** - * Move constructor needed by g++ since it is not inherited - */ - variant_builder_impl ( variant_builder_impl && other ) = default; - - /** - * Copy operator = needed by g++ since it is not inherited - */ - variant_builder_impl & operator = ( variant_builder_impl && other ) = default; - - /** - * Move operator = needed by g++ since it is not inherited - */ - variant_builder_impl & operator = ( const variant_builder_impl & other ) = default; -#endif }; template < class T, class ... Ts > @@ -152,38 +88,6 @@ struct variant_builder_start : public variant_builder_impl < std::variant < T >, * Inherit constructors of the standard variant */ using variant_builder_impl < std::variant < T >, Ts ... >::variant_builder_impl; - - /** - * Inherit operator = of the standard variant - */ - using variant_builder_impl < std::variant < T >, Ts ... >::operator =; -#ifndef __clang__ - - /** - * Default constructor needed by g++ since it is not inherited - */ - variant_builder_start ( ) = default; - - /** - * Copy constructor needed by g++ since it is not inherited - */ - variant_builder_start ( const variant_builder_start & other ) = default; - - /** - * Move constructor needed by g++ since it is not inherited - */ - variant_builder_start ( variant_builder_start && other ) = default; - - /** - * Copy operator = needed by g++ since it is not inherited - */ - variant_builder_start & operator = ( variant_builder_start && other ) = default; - - /** - * Move operator = needed by g++ since it is not inherited - */ - variant_builder_start & operator = ( const variant_builder_start & other ) = default; -#endif }; /** @@ -302,7 +206,7 @@ public: /** * Inherit operator = of the standard variant */ - using variant_builder_start < Ts ... >::operator =; + using variant_builder_start < Ts ... >::__std__variant::operator=; #ifndef __clang__ /** -- GitLab