File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,6 @@ namespace tao
2424 return v;
2525 }
2626
27- template < template < typename ... > class Traits >
28- basic_value< Traits > & operator -= ( basic_value< Traits > & v, const std::string & k )
29- {
30- if ( v.get_object ().erase ( k ) == 0 ) {
31- throw std::runtime_error ( " key not found: " + k );
32- }
33- return v;
34- }
35-
3627 template < template < typename ... > class Traits >
3728 basic_value< Traits > & operator -= ( basic_value< Traits > & v, std::initializer_list< std::string > l )
3829 {
Original file line number Diff line number Diff line change @@ -23,13 +23,13 @@ namespace tao
2323 TEST_THROWS ( v -= { " what?" } );
2424 v -= {};
2525 TEST_ASSERT ( v.get_object ().size () == 3 );
26- v -= " bar" ;
27- TEST_THROWS ( v -= " bar" );
26+ v -= { " bar" };
2827 TEST_THROWS ( v -= { " bar" } );
2928 TEST_ASSERT ( v.get_object ().size () == 2 );
3029 v -= { " foo" , " baz" };
3130 TEST_ASSERT ( v.get_object ().size () == 0 );
32- TEST_THROWS ( v -= " foo" );
31+ TEST_THROWS ( v -= { " foo" } );
32+ TEST_THROWS ( v -= { " bar" } );
3333 TEST_THROWS ( v -= { " baz" } );
3434 }
3535
You can’t perform that action at this time.
0 commit comments