/* Copyright 2023 Glen Joseph Fernandes (glenjofe@gmail.com) Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_CORE_DATA_HPP #define BOOST_CORE_DATA_HPP #include #include namespace boost { template inline constexpr auto data(C& c) noexcept(noexcept(c.data())) -> decltype(c.data()) { return c.data(); } template inline constexpr auto data(const C& c) noexcept(noexcept(c.data())) -> decltype(c.data()) { return c.data(); } template inline constexpr T* data(T(&a)[N]) noexcept { return a; } template inline constexpr const T* data(std::initializer_list l) noexcept { return l.begin(); } } /* boost */ #endif