C++ boost::type_traits::has_multiplies_assign














































C++ boost::type_traits::has_multiplies_assign



Description:
boost::has_multiplies_assign will check if the arguments can be used with multiplication and assignment operator.

Syntax:
boost::has_multiplies_assign<arg1, arg2, arg3>::value_type
or
boost::has_multiplies_assign<arg1, arg2, arg3>::value ( all the three are not necessary )

Headers:
#include<boost/type_traits.hpp>
or
#include<boost/type_traits/has_operator.hpp>
or
#include<boost/type_traits/has_multiplies_assign.hpp>

Sample Code:
#include<iostream>
#include<boost/type_traits.hpp> //#include<boost/type_traits/has_multiplies_assign.hpp> //#include<boost/type_traits/has_operator.hpp> using namespace std; int main() { cout<<boolalpha; cout<<boost::has_multiplies_assign<int, int>::value<<endl; cout<<boost::has_multiplies_assign<int, float>::value<<endl; cout<<boost::has_multiplies_assign<float, float>::value<<endl; cout<<boost::has_multiplies_assign<float, int>::value<<endl; cout<<boost::has_multiplies_assign<int*>::value<<endl; cout<<boost::has_multiplies_assign<string>::value<<endl; cout<<boost::has_multiplies_assign<int, string>::value<<endl; cout<<boost::has_multiplies_assign<long>::value<<endl; return 0; }

Output:
true true true true false false false true

More Articles of Ayush Ranjan:

Name Views Likes
C++ boost::type_traits::type_with_alignment 231 10
C++ boost::type_traits::type_identity 234 9
C++ boost::type_traits::remove_volatile 198 12
C++ boost::type_traits::remove_reference 223 11
C++ boost::type_traits::remove_pointer 211 5
C++ boost::type_traits::remove_extent 215 4
C++ boost::type_traits::remove_cv 239 6
C++ boost::type_traits::remove_const 226 15
C++ boost::type_traits::remove_all_extents 235 9
C++ boost::type_traits::rank 194 5
C++ boost::type_traits::promote 225 21
C++ boost::type_traits::make_unsigned 216 21
C++ boost::type_traits::make_signed 212 4
C++ boost::type_traits::is_volatile 223 1
C++ boost::type_traits::is_void 208 9
C++ boost::type_traits::is_virtual_base_of 207 1
C++ boost::type_traits::is_unsigned 190 14
C++ boost::type_traits::make_signed 77 9
C++ boost::type_traits::is_union 226 11
C++ boost::type_traits::is_stateless 195 3
C++ boost::type_traits::is_signed 202 9
C++ boost::type_traits::is_scalar 193 13
C++ boost::type_traits::is_same 221 0
C++ boost::type_traits::is_rvalue_reference 212 9
C++ boost::type_traits::is_reference 203 0
C++ boost::type_traits::is_polymorphic 193 8
C++ boost::type_traits::is_pointer 190 19
C++ boost::type_traits::is_pod 201 17
C++ boost::type_traits::is_object 185 6
C++ boost::type_traits::is_nothrow_move_constructible 226 25
C++ boost::type_traits::is_nothrow_move_assignable 201 8
C++ boost::type_traits::is_member_pointer 187 14
C++ boost::type_traits::is_member_object_pointer 191 15
C++ boost::type_traits::is_member_function_pointer 203 14
C++ boost::type_traits::is_lvalue_reference 191 7
C++ boost::type_traits::is_integral 206 15
C++ boost::type_traitsis_fundamental 195 12
C++ boost::type_traits::is_function 201 17
C++ boost::type_traits::is_floating_point 199 6
C++ boost::type_traits::is_final 195 6
C++ boost::type_traits::is_enum 197 11
C++ boost::type_traits::is_empty 228 4
C++ boost::type_traits::is_destructible 202 1
C++ boost::type_traits::is_default_constructible 199 2
C++ boost::type_traits::is_copy_constructible 210 13
C++ boost::type_traits::is_copy_assignable 204 7
C++ boost::type_traits::is_convertible 207 4
C++ boost::type_traits::is_constructible 206 1
C++ boost::type_traits::is_const 229 1
C++ boost::type_traits::is_compound 208 1
C++ boost::type_traits::is_complex 276 8
C++ boost::type_traits::is_class 212 14
C++ boost::type_traits::is_base_of 203 17
C++ boost::type_traits::is_assignable 202 33
C++ boost::type_traits::is_array 210 23
C++ boost::Type_traits::is_arithmetic 215 21
C++ boost::type_traits::is_abstract 211 18
C++ boost::type_traits::integral_promotion 199 4
C++ boost::type_traits::integral_constant 188 34
C++ boost::type_traits::has_virtual_destructor 180 5
C++ boost::type_traits::has_unary_plus 198 8
C++ boost::type_traits::has_unary_minus 216 7
C++ boost::type_traits::has_trivial_move_constructor 166 6
C++ boost::type_traits::has_trivial_move_assign 182 8
C++ boost::type_traits::has_trivial_destructor 179 23
C++ boost::type_traits::has_unary_plus 190 9
C++ boost::type_traits::has_unary_minus 149 10
C++ boost::type_traits::has_trivial_copy 138 4
C++ boost::type_traits::has_trivial_constructor 166 4
C++ boost::type_traits::has_trivial_assign 146 3
C++ boost::type_traits::has_right_shift_assign 115 10
C++ boost::type_traits::has_right_shift 146 5
C++ boost::type_traits::has_pre_increment 124 10
C++ boost::type_traits::has_pre_decrement 114 0
C++ boost::type_traits::has_post_increment 109 4
C++ boost::type_traits::has_post_decrement 149 56
C++ boost::type_traits::has_plus_assign 131 4
C++ boost::type_traits::has_plus 134 21
C++ boost::type_traits::has_nothrow_destructor 116 5
C++ boost::type_traits::has_nothrow_copy 128 6
C++ boost::type_traits::has_nothrow_constructor 143 3
C++ boost::type_traits::has_nothrow_assgin 146 6
C++ boost::type_traits::has_not_equal_to 153 2
C++ boost::type_traits::has_new_operator 128 24
C++ boost::type_traits::has_negate 146 35
C++ boost::type_traits::has_multiplies_assign 137 46
C++ boost::type_traits::has_multiplies 141 16
C++ boost::type_traits::has_modulus_assign 125 3
C++ boost::type_traits::has_modulus 148 2
C++ boost::type_traits::has_minus_assign 138 2
C++ boost::type_traits::has_minus 116 2
C++ boost::type_traits::has_logical_or 133 1
C++ boost::type_traits::has_logical_not 125 1
C++ boost::type_traits::has_logical_and 132 1
C++ boost::type_traits::has_less_equal 112 1
C++ boost::type_traits::has_less 109 1
C++ boost::type_traits::left_shift_assign 132 1
C++ boost::type_traits::has_left_shift 111 1
C++ boost::type_traits::has_greater_equal 116 1
C++ boost::type_traits::has_greater 115 1
C++ boost::type_traits::has_equal_to 120 1
C++ boost::type_traits::has_divides_assign 113 1
C++ boost::type_traits::has_divides 108 1
C++ boost::type_traits::has_dereference 120 1
C++ boost::type_traits::has_complement 109 1
C++ boost::type_traits::has_bit_xor_assign 127 1
C++ boost::type_traits::has_bit_xor 120 1
C++ boost::type_traits::has_bit_or_assign 124 1
C++ boost::type_traits::has_bit_or 152 1
C++ boost::type_traits::has_bit_and_assign 122 3
C++ boost::type_traits::has_bit_and 114 1
C++ boost::type_traits::function_traits 236 1
C++ boost::type_traits::floating_point_promotion 116 1
C++ boost::type_traits::extent 132 1
C++ boost::type_traits::declval 130 1
C++ boost::type_traits::decay 108 1
C++ boost::type_traits::copy_cv 122 1
C++ boost::type_traits::common_type 123 1
C++ boost::type_traits::conditional 129 1
C++ boost::type_traits::alignment_of 153 1
C++ boost::type_traits::aligned_storage 122 1
C++ boost::type_traits::add_volatile 147 1
C++ boost::type_traits::add_rvalue_reference 128 1
C++ boost::type_traits::add_reference 138 1
C++ boost::type_traits::add_pointer 137 1
C++ boost::type_traits::add_lvalue_reference 123 1
C++ boost::type_traits::add_cv 140 1
C++ boost::type_traits::add_const 144 1
C++boost::EnableIf 220 2
C++ boost::foreach 457 1
C++ boost::lambda 274 1
C++ Boost Lambda 327 1
Program to check whether a number is Palindrome or not 221 2

Comments