From f01ae8bf18c9db3c1e0ae55334987d581ed9279b Mon Sep 17 00:00:00 2001 From: "Dr. Colin Hirsch" Date: Thu, 21 Sep 2023 00:27:55 +0200 Subject: [PATCH] Remove not needed binding element write. --- include/tao/json/binding/element.hpp | 6 --- .../tao/json/binding/internal/elementw.hpp | 54 ------------------- 2 files changed, 60 deletions(-) diff --git a/include/tao/json/binding/element.hpp b/include/tao/json/binding/element.hpp index ff3c9fe5..6d6bae99 100644 --- a/include/tao/json/binding/element.hpp +++ b/include/tao/json/binding/element.hpp @@ -36,12 +36,6 @@ namespace tao::json::binding return v.*P; } - template< typename W > - static void write( C& v, W&& w ) noexcept( std::is_nothrow_assignable_v< value_t, decltype( std::forward< W > ) > ) - { - v.*P = std::forward< W >( w ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >& v, C& x ) { diff --git a/include/tao/json/binding/internal/elementw.hpp b/include/tao/json/binding/internal/elementw.hpp index 6ab071e2..85ab2ceb 100644 --- a/include/tao/json/binding/internal/elementw.hpp +++ b/include/tao/json/binding/internal/elementw.hpp @@ -23,12 +23,6 @@ namespace tao::json::binding::internal using write_class_t = C; using write_value_t = std::decay_t< T >; - template< typename W > - static void write( C& c, W&& w ) noexcept( N ) - { - P( c, std::forward< W >( w ) ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >& v, C& c ) { @@ -48,12 +42,6 @@ namespace tao::json::binding::internal using write_class_t = C; using write_value_t = std::decay_t< T >; - template< typename W > - static void write( C& c, W&& w ) noexcept( N ) - { - P( c ) = std::forward< W >( w ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >& v, C& c ) { @@ -73,12 +61,6 @@ namespace tao::json::binding::internal using write_class_t = C; using write_value_t = std::decay_t< T >; - template< typename W > - static void write( C& c, W&& w ) noexcept( N ) - { - ( c.*P )( std::forward< W >( w ) ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >( v ), C& c ) { @@ -100,12 +82,6 @@ namespace tao::json::binding::internal using write_class_t = C; using write_value_t = std::decay_t< T >; - template< typename W > - static void write( C& c, W&& w ) noexcept( true ) - { - P( c, std::forward< W >( w ) ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >& v, C& c ) { @@ -125,12 +101,6 @@ namespace tao::json::binding::internal using write_class_t = C; using write_value_t = std::decay_t< T >; - template< typename W > - static void write( C& c, W&& w ) noexcept( false ) - { - P( c, std::forward< W >( w ) ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >& v, C& c ) { @@ -150,12 +120,6 @@ namespace tao::json::binding::internal using write_class_t = C; using write_value_t = std::decay_t< T >; - template< typename W > - static void write( C& c, W&& w ) noexcept( true ) - { - P( c ) = std::forward< W >( w ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >& v, C& c ) { @@ -175,12 +139,6 @@ namespace tao::json::binding::internal using write_class_t = C; using write_value_t = std::decay_t< T >; - template< typename W > - static void write( C& c, W&& w ) noexcept( false ) - { - P( c ) = std::forward< W >( w ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >& v, C& c ) { @@ -200,12 +158,6 @@ namespace tao::json::binding::internal using write_class_t = C; using write_value_t = std::decay_t< T >; - template< typename W > - static void write( C& c, W&& w ) noexcept( true ) - { - ( c.*P )( std::forward< W >( w ) ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >( v ), C& c ) { @@ -225,12 +177,6 @@ namespace tao::json::binding::internal using write_class_t = C; using write_value_t = std::decay_t< T >; - template< typename W > - static void write( C& c, W&& w ) noexcept( false ) - { - ( c.*P )( std::forward< W >( w ) ); - } - template< template< typename... > class Traits > static void to( const basic_value< Traits >( v ), C& c ) {