0

I cannot seem to see the difference between boost::is_same and boost::mpl::same_as. Could someone perhaps point these out and where only the specific variant can be used.

abergmeier
  • 13,224
  • 13
  • 64
  • 120
  • It could be that `boost::is_same` is there for compatibility with [`std::is_same`](http://en.cppreference.com/w/cpp/types/is_same), while `boost::mpl::same_as` is an older variant? – Some programmer dude Aug 01 '14 at 06:51

1 Answers1

3

Effectively, nothing. If you actually look at the source of mpl::same_as, it includes is_same and then uses it directly.

Note that <type_traits> is part of the standard library as of C++11, and includes std::is_same (which acts exactly like the aforementioned two functions in boost).

Yuushi
  • 25,132
  • 7
  • 63
  • 81
  • While the check performed is the same, `same_as`'s interface seems to be different. – T.C. Aug 01 '14 at 06:52