Changeset 44618


Ignore:
Timestamp:
Apr 20, 2008, 12:42:38 PM (10 years ago)
Author:
Daniel James
Message:

Some extra compile tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/unordered/trunk/libs/unordered/test/unordered/compile_tests.hpp

    r44516 r44618  
    2626
    2727template <class T> void sink(T const&) {}
     28template <class T> T rvalue(T const& v) { return v; }
    2829
    2930template <class X, class T>
     
    145146
    146147template <class X, class Key, class T>
    147 void unordered_map_test(X&, Key const&, T const&)
     148void unordered_map_test(X& r, Key const& k, T const& v)
    148149{
    149150    typedef BOOST_DEDUCED_TYPENAME X::value_type value_type;
    150151    typedef BOOST_DEDUCED_TYPENAME X::key_type key_type;
    151152    BOOST_MPL_ASSERT((boost::is_same<value_type, std::pair<key_type const, T> >));
     153
     154#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
     155    Key k_lvalue(k);
     156    T v_lvalue(v);
     157
     158    r.emplace(k, v);
     159    r.emplace(k_lvalue, v_lvalue);
     160    r.emplace(rvalue(k), rvalue(v));
     161#endif
    152162}
    153163
Note: See TracChangeset for help on using the changeset viewer.