summaryrefslogtreecommitdiffstats
path: root/test/localization/locales/locale/locale.operators/compare.pass.cpp
blob: e01e215b56a76fe685b3939d56911df737d99d70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <locale>

// template <class charT, class Traits, class Allocator> 
//   bool operator()(const basic_string<charT,Traits,Allocator>& s1, 
//                   const basic_string<charT,Traits,Allocator>& s2) const;

#include <locale>
#include <cassert>

int main()
{
    {
        std::locale l;
        {
            std::string s2("aaaaaaA");
            std::string s3("BaaaaaA");
            assert(l(s3, s2));
        }
        {
            std::wstring s2(L"aaaaaaA");
            std::wstring s3(L"BaaaaaA");
            assert(l(s3, s2));
        }
    }
}