121308Sache// { dg-do compile }
221308Sache
321308Sache// 2007-03-12  Stephen M. Webb  <stephen.webb@bregmasoft.com>
421308Sache//
521308Sache// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
621308Sache//
721308Sache// This file is part of the GNU ISO C++ Library.  This library is free
821308Sache// software; you can redistribute it and/or modify it under the
921308Sache// terms of the GNU General Public License as published by the
1058310Sache// Free Software Foundation; either version 3, or (at your option)
1121308Sache// any later version.
1221308Sache
1321308Sache// This library is distributed in the hope that it will be useful,
1421308Sache// but WITHOUT ANY WARRANTY; without even the implied warranty of
1521308Sache// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1621308Sache// GNU General Public License for more details.
1721308Sache
1821308Sache// You should have received a copy of the GNU General Public License along
1921308Sache// with this library; see the file COPYING3.  If not see
2021308Sache// <http://www.gnu.org/licenses/>.
2158310Sache
2221308Sache// tr1 [7.8.3] class template basic_regex assign()
2321308Sache
2421308Sache#include <string>
2521308Sache#include <tr1/regex>
2658310Sache#include <testsuite_hooks.h>
2758310Sache
2858310Sache// Tests C++ string assignment of the basic_regex class.
2958310Sachevoid test01()
3021308Sache{
3147558Sache  typedef std::tr1::basic_regex<char> test_type;
3221308Sache
3375406Sache  std::string s("a*b");
3421308Sache  test_type re;
3547558Sache  re.assign(s);
3621308Sache}
3775406Sache
3821308Sacheint
3921308Sachemain()
4021308Sache{
4121308Sache  test01();
4235486Sache  return 0;
4321308Sache};
4435486Sache