The bit_xor is an inbuilt function in C++ which is used to perform bitwise_xor and return the result after applying the bitwise_xor operation on it’s arguments.
template <class T> struct bit_xor;
Parameters: It accepts a parameter T which is the type of the argument to be compared by the functional call.
- Objects of this class can be used on standard algorithms such as transform or accumulate.
- Member functions ( ‘operator()’ ) returns the bit_xor of its arguments.
We must include the library ‘functional’ and ‘algorithm’ to use bit_xor and transform() respectively.
Below is the illustration of bit_xor in C++:
A xor B = 7 5 11 0 0 6
A xor B = 1 0 245 0
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- std::less in C++ with Examples
- cin get() in C++ with Examples
- Pi(π) in C++ with Examples
- std::is_trivially_destructible in C++ with Examples
- std::is_nothrow_default_constructible in C++ with Examples
- ratio_equal() in C++ with examples
- std::is_move_constructible in C++ with Examples
- std::is_member_pointer in C++ with Examples
- std::is_nothrow_copy_assignable in C++ with Examples
- cauchy_distribution a() in C++ with Examples
- std::is_nothrow_constructible in C++ with Examples
- std::is_trivially_move_constructible in C++ with Examples
- std::is_nothrow_assignable in C++ with Examples
- mbrtoc16() in C/C++ with Examples
- std::rank in C++ with Examples
- std::is_trivially_move_assignable in C++ with Examples
- std::add_lvalue_reference in C++ with Examples
- C/C++ if else statement with Examples
- std::make_signed in C++ with Examples
- Manipulators in C++ with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.