Files

95 lines
2.3 KiB
C++
Raw Permalink Normal View History

/*
*
* Copyright (c) 2003
2005-01-21 17:28:42 +00:00
* John Maddock
*
2003-10-04 11:29:20 +00:00
* Use, modification and distribution are subject to the
2003-09-30 13:02:51 +00:00
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
2003-06-27 11:11:21 +00:00
#include <boost/regex.hpp>
2005-01-13 17:06:21 +00:00
#include <boost/config.hpp>
2003-12-29 11:38:03 +00:00
2003-08-12 11:24:09 +00:00
#if defined(BOOST_MSVC)
// this lets us compile at warning level 4 without seeing concept-check related warnings
# pragma warning(disable:4100)
#endif
#ifdef BOOST_BORLANDC
2005-01-13 17:06:21 +00:00
#pragma option -w-8019 -w-8004 -w-8008
#endif
#ifdef BOOST_INTEL
#pragma warning(disable:1418 981 983 595 383)
#endif
2005-01-13 17:06:21 +00:00
#include <boost/regex/concepts.hpp>
2003-06-27 11:11:21 +00:00
int main()
{
boost::function_requires<
2005-01-13 17:06:21 +00:00
boost::RegexTraitsConcept<
boost::regex_traits<char>
2003-06-27 11:11:21 +00:00
>
>();
2005-01-13 17:06:21 +00:00
#ifndef BOOST_NO_STD_LOCALE
2003-06-27 11:11:21 +00:00
boost::function_requires<
2005-01-13 17:06:21 +00:00
boost::BoostRegexConcept<
boost::basic_regex<char, boost::cpp_regex_traits<char> >
>
>();
#ifndef BOOST_NO_WREGEX
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<wchar_t, boost::cpp_regex_traits<wchar_t> >
2003-06-27 11:11:21 +00:00
>
>();
#endif
2004-03-02 17:00:15 +00:00
#endif
2005-01-13 17:06:21 +00:00
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<char, boost::c_regex_traits<char> >
>
>();
#ifndef BOOST_NO_WREGEX
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<wchar_t, boost::c_regex_traits<wchar_t> >
>
>();
#endif
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<char, boost::w32_regex_traits<char> >
>
>();
#ifndef BOOST_NO_WREGEX
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<wchar_t, boost::w32_regex_traits<wchar_t> >
>
>();
#endif
#endif
//
// now test the regex_traits concepts:
//
typedef boost::basic_regex<char, boost::regex_traits_architype<char> > regex_traits_tester_type1;
boost::function_requires<
boost::BoostRegexConcept<
regex_traits_tester_type1
>
>();
typedef boost::basic_regex<boost::char_architype, boost::regex_traits_architype<boost::char_architype> > regex_traits_tester_type2;
boost::function_requires<
boost::BaseRegexConcept<
regex_traits_tester_type2
>
>();
return 0;
2003-06-27 11:11:21 +00:00
}
2003-09-30 13:02:51 +00:00