//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template // class sub_match // : public pair // { // public: // typedef BidirectionalIterator iterator; // typedef typename iterator_traits::value_type value_type; // typedef typename iterator_traits::difference_type difference_type; // typedef basic_string string_type; // // bool matched; // ... // }; #include #include #include int main() { { typedef std::sub_match SM; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_convertible*>::value), ""); SM sm; sm.first = nullptr; sm.second = nullptr; sm.matched = false; } { typedef std::sub_match SM; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_convertible*>::value), ""); SM sm; sm.first = nullptr; sm.second = nullptr; sm.matched = false; } { static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); } }