2
0
mirror of https://github.com/boostorg/locale.git synced 2026-01-19 04:22:08 +00:00
Files
locale/test/cmake_test/main.cpp
Alexander Grund a4b80f9de2 Deprecate create_*_new_ptr functions and introduce helper to create a unique_ptr
Ownership should always be clear so remove those functions returning raw pointers.
2023-06-28 22:48:53 +02:00

26 lines
691 B
C++

//
// Copyright (c) 2022-2023 Alexander Grund
//
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/locale/util.hpp>
#include <boost/assert.hpp>
#include <iostream>
int main()
{
// Simple test that including a library header and using an exported function works
std::unique_ptr<boost::locale::util::base_converter> cvt = boost::locale::util::create_utf8_converter();
if(cvt) {
std::cout << "Created..." << std::endl;
BOOST_ASSERT(cvt->is_thread_safe());
BOOST_ASSERT(cvt->max_len() == 4);
} else
std::cout << "Failed creation..." << std::endl;
return cvt ? 0 : 1;
}