Changeset 1556 for trunk/yat/split.cc


Ignore:
Timestamp:
Jan 4, 2013, 8:33:14 AM (9 years ago)
Author:
Peter Johansson
Message:

update to latest yat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/split.cc

    r1463 r1556  
    1 // $Id: split.cc 2434 2011-03-08 16:52:23Z peter $
     1// $Id: split.cc 2881 2012-11-18 01:28:05Z peter $
    22
    33/*
    4   Copyright (C) 2010 Peter Johansson
     4  Copyright (C) 2010, 2012 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2020*/
    2121
     22#include <config.h>
     23
    2224#include "split.h"
    2325
     
    2931namespace utility {
    3032
    31   void split(std::vector<std::string>& vec, const std::string& str, char delim)
     33namespace detail {
     34
     35  /*
     36    implementation of split functions is declared in private namespace
     37    and only available in this file.
     38   */
     39  template<typename T>
     40  void split(std::vector<std::string>& vec, const std::string& str, T delim)
    3241  {
    3342    size_t pos=0;
     
    4049    }
    4150  }
     51} // end of namespace detail
     52
     53
     54  void split(std::vector<std::string>& vec, const std::string& str, char delim)
     55  {
     56    detail::split(vec, str, delim);
     57  }
     58
     59
     60  void split(std::vector<std::string>& vec, const std::string& str,
     61             const std::string& delim)
     62  {
     63    detail::split(vec, str, delim);
     64  }
    4265
    4366}}} // of namespace utility, yat, and theplu
Note: See TracChangeset for help on using the changeset viewer.